Session Management Method and System, and Terminal for Locating a User Plane Function (UPF) Entity when a Session is an Inactive State

ABSTRACT

Embodiments of the present application relate to the field of communications technologies, and provide a session management method and system, and a terminal. The method includes: when user equipment UE has a first protocol data unit PDU session, sending, by the UE, a service request message to an access and mobility management function AMF entity; receiving, by the UE, a first message sent by the AMF entity; and determining, by the UE based on the first message, to re-establish or modify the first PDU session. In the embodiments of the present invention, the UE sends the service request message to the AMF entity, and then the AMF entity sends, to the UE, the first message used to determine to re-establish or modify the first PDU session.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.16/612,086 filed on Nov. 8, 2019, which is a National Stage ofInternational Patent Application No. PCT/CN2017/083667 filed on May 9,2017, both of which are incorporated herein by reference in theirentireties.

TECHNICAL FIELD

Embodiments of the present invention relate to the field ofcommunications technologies, and in particular, to a session managementmethod and system, and a terminal.

BACKGROUND

In the 5th-generation mobile communication technology (5-Generation,5G), a PDU session (session) used to provide a protocol data unit(Protocol Data Unit, PDU) connection service exists between userequipment (User Equipment, UE) and a data network (Date Network, DN).Session and service continuity modes that are usually used for the PDUsession are a session and service continuity mode (Session and ServiceContinuity mode, SSC mode) 1 and an SSC mode 2.

As shown in FIG. 1, FIG. 1 shows a procedure for establishing a sessionof an SSC mode 1. To be specific, UE sends a first message used toinstruct to establish a session; after selecting a session managementfunction (Session Management Function, SMF) entity based on the firstmessage, an access and mobility management function (Authentication andMobility Management Function, AMF) entity sends the first message to theselected SMF entity; and then, when the SMF entity receives the firstmessage sent by the UE, the SMF entity selects a new user plane function(User Plan Function, UPF) entity, to establish a first PDU sessionbetween the user equipment and the SMF entity.

In a conventional technical solution, as shown in FIG. 2, FIG. 2 is aschematic flowchart of UPF entity relocation when a session of an SSCmode 1 is in an active state. In FIG. 2, an SMF entity determines thatthere is a need to change again a UPF entity with which UE establishes asession. In this case, the SMF entity sends a second message to the UEby using an AMF entity. The second message is used to instruct the UE tore-establish a PDU session that has a same data network (Data Network,DN) as the session. Then, the SMF entity releases a first PDU session,and when receiving a request that is sent by the UE and that is used toestablish a second session, the SMF entity establishes a second sessionwith the user equipment by using a first UPF entity.

However, the conventional technical solution is applicable to only aprocedure in which when a session mode is in an active state, an SMFentity determines that there is a need to change again a UPF entity withwhich UE establishes a session. If the session is in an inactive state(for example, the UE is in an idle state, or the UE is in a connectedstate but the session is in an inactive state), a procedure of how tochange again a UPF entity with which the UE establishes a session is notclear.

SUMMARY

This application provides a session management method and system, and aterminal, so as to resolve a prior-art problem of how to relocate a UPFentity when a session is in an inactive state.

To achieve the foregoing objective, this application uses the followingtechnical solutions.

According to a first aspect, an embodiment of the present inventionprovides a session management method, where user equipment UE has afirst protocol data unit PDU session, and the method provided in thisembodiment of the present invention includes: sending, by the UE, aservice request message to an access and mobility management functionAMF entity; receiving, by the UE, a first message sent by the AMFentity; and re-establishing or modifying, by the UE, the first PDUsession based on the first message.

In the session management method provided in this embodiment of thepresent invention, the UE sends the service request message to the AMFentity, and then the AMF entity sends, to the UE, the first message usedto determine to re-establish the first PDU session. In this case, whenit is determined that the first PDU session needs to be activated orthat the UE moves out of an area corresponding to the first PDU session,it may be ensured that before data needs to be transmitted or received,the first PDU session is re-established in time to generate a second PDUsession, so as to ensure that data is not lost.

With reference to the first aspect, in a first possible implementationof the first aspect, the first message is a service accept message, theservice accept message carries an identifier of the first PDU sessionand a first indication, the identifier is used to identify the first PDUsession, and the first indication is used to instruct to re-establish ormodify a PDU session. The UE directly determines, with reference tospecific content of the first indication, to re-establish or modify thefirst PDU session, so that after receiving the indication used toinstruct to re-establish the first PDU session, the UE directly sends asecond message used to re-establish the first PDU session; or afterreceiving the indication used by a user to instruct to modify the firstPDU session, the UE directly sends a second message used to modify thefirst PDU session.

With reference to the first aspect or the first possible implementationof the first aspect, in a second possible implementation of the firstaspect, the re-establishing or modifying, by the UE, the first PDUsession based on the first message includes: if the first indication isused to instruct the UE to re-establish the first PDU session,re-establishing, by the UE, the first PDU session based on theidentifier and the first indication.

With reference to any one of the first aspect to the second possibleimplementation of the first aspect, in a third possible implementationof the first aspect, the re-establishing or modifying, by the UE, thefirst PDU session based on the first message includes: if the firstindication is used to instruct the UE to modify the first PDU session,modifying, by the UE, the first PDU session based on the identifier andthe first indication.

With reference to any one of the first aspect to the third possibleimplementation of the first aspect, in a fourth possible implementationof the first aspect, the first message is a service reject message, theservice reject message carries an identifier of the first PDU sessionand a cause value, the identifier is used to identify the first PDUsession, and the cause value indicates that the UE moves out of an areacorresponding to a PDU session. In this way, after receiving the firstmessage, the AMF entity may determine, based on the cause value, thatthe UE moves out of an area corresponding to the first PDU sessionassociated with the identifier, so as to trigger the AMF entity toperform UPF entity relocation or trigger an SMF entity to perform UPFentity relocation.

With reference to any one of the first aspect to the fourth possibleimplementation of the first aspect, in a fifth possible implementationof the first aspect, the re-establishing, by the UE, the first PDUsession based on the first message includes: determining, by the UEbased on the identifier and the cause value, to re-establish or modifythe first PDU session.

With reference to any one of the first aspect to the fifth possibleimplementation of the first aspect, in a sixth possible implementationof the first aspect, after the re-establishing or modifying, by the UE,the first PDU session based on the first message, the method furtherincludes: sending, by the UE to the AMF entity, a second message used torequest to re-establish or modify the first PDU session. Afterdetermining to re-establish or modify the first PDU session, the UEtriggers the second message used to re-establish or modify the first PDUsession, so as to ensure that the second PDU session is in an activestate before data is sent.

According to a second aspect, an embodiment of the present inventionprovides a session management method, where user equipment UE has afirst protocol data unit PDU session, and the method provided in thisembodiment of the present invention includes: receiving, by an SMFentity, a first message that is sent by an access and mobilitymanagement function AMF entity and that is used to instruct the SMFentity to determine whether the UE moves out of an area corresponding tothe first PDU session; determining, by the SMF entity based on the firstmessage, that the UE moves out of a service area of a user planefunction UPF entity corresponding to the first PDU session; and sending,by the SMF entity, a first parameter to the UE by using the AMF entity,where the first parameter is used to instruct the UE to re-establish ormodify the first PDU session.

With reference to the second aspect, in a first possible implementationof the second aspect, the first parameter includes an identifier of thefirst PDU session and a first indication, the identifier is used toidentify the first PDU session, and the first indication is used toinstruct the UE to send a request used to re-establish or modify thefirst PDU session associated with the identifier.

With reference to the second aspect or the first possible implementationof the second aspect, in a second possible implementation of the secondaspect, before the receiving, by an SMF entity, a first message sent byan access and mobility management function AMF entity, the methodprovided in this embodiment of the present invention further includes:sending, by the SMF entity to the AMF entity, the area corresponding tothe first PDU session; or sending, by the SMF entity to the AMF entity,an identifier of the user plane function UPF entity corresponding to thefirst PDU session, where the identifier of the UPF entity is used by theAMF entity to determine the area corresponding to the first PDU session.

With reference to any one of the second aspect to the second possibleimplementation of the second aspect, in a third possible implementationof the second aspect, the first message carries location information ofthe UE, or the first message carries a second indication used toindicate that the UE moves out of the area corresponding to the firstPDU session.

With reference to any one of the second aspect to the third possibleimplementation of the second aspect, in a fourth possible implementationof the second aspect, when the SMF entity determines, based on the firstmessage, that a location of the UE is outside the area corresponding tothe first PDU session, the sending, by the SMF entity, a first parameterto the UE by using the AMF entity further includes: determining, by theSMF entity, a session continuity mode of the first PDU session; and whenthe SMF entity determines that the session continuity mode of the firstPDU session is a first session mode or a second session mode, sending,by the SMF entity, the first parameter to the UE by using the AMFentity.

According to a third aspect, an embodiment of the present inventionprovides a session management method, where user equipment UE has afirst protocol data unit PDU session, and the method provided in thisembodiment of the present invention includes: after an access andmobility management function AMF entity determines that a servicerequest message sent by the UE is received, sending, by the AMF entityto an SMF entity, a first message that is used by the SMF entity todetermine whether a location of the UE is outside an area correspondingto the first PDU session; receiving, by the AMF entity, a firstparameter that is sent by the SMF entity and that is used to instructthe UE to send a request used to re-establish or modify the first PDUsession; and sending, by the AMF entity, the first parameter to the UE.

With reference to the third aspect, in a first possible implementationof the third aspect, the first parameter includes an identifier of thefirst PDU session and a first indication, the identifier is used toidentify the first PDU session, and the first indication is used toinstruct the UE to send a request used to re-establish the first PDUsession associated with the identifier.

With reference to the third aspect or the first possible implementationof the third aspect, in a second possible implementation of the thirdaspect, after the access and mobility management function AMF entitydetermines that the service request message sent by the UE is receivedand before the AMF entity obtains location information of the UE, themethod provided in this embodiment of the present invention furtherincludes: receiving, by the AMF entity, the area that is correspondingto the first PDU session and that is sent by the SMF entity; orreceiving, by the AMF entity, an identifier that is of a UPF entitycorresponding to the first PDU session and that is sent by the SMFentity, where the identifier of the UPF entity is used by the AMF entityto determine the area corresponding to the first PDU session.

With reference to any one of the third aspect to the second possibleimplementation of the third aspect, in a third possible implementationof the third aspect, the first message carries the location informationof the UE or a second indication used to indicate that the location ofthe UE is outside the area corresponding to the first PDU session.

According to a fourth aspect, an embodiment of the present inventionprovides a session management method, including: in a process in whichuser equipment UE establishes a first protocol data unit PDU sessionwith a session management function SMF entity, receiving, by the UE, afirst message that is sent by the SMF entity and that includes an areacorresponding to the first PDU session; and when the UE determines,based on the area corresponding to the first PDU session, that the UEmeets a first condition, sending, by the UE to a target entity, a secondmessage used to indicate that the UE moves out of the area correspondingto the first PDU session, where the first condition includes that the UEmoves out of the area corresponding to the first PDU session.

In the session management method provided in this application, in theprocess in which the UE establishes the first PDU session with the SMFentity, the SMF entity provides, for the UE, the area corresponding tothe first PDU session. In this way, when the UE is in an idle state,once the UE is outside the area corresponding to the first PDU session,the UE triggers a PDU session modification request message to update thearea corresponding to the first PDU session. In this process, the SMFentity performs UPF relocation. Therefore, it may be ensured that UPFentity relocation is performed before data is transmitted, so as toensure that data is not lost.

With reference to the fourth aspect, in a first possible implementationof the fourth aspect, the first message further includes a firstindication, and the first indication is used to instruct the UE to sendthe second message to the target entity after the UE determines that theUE moves out of the area corresponding to the first PDU session, andwhen a status of the UE is switched from an idle state to a connectedstate or when the UE has uplink data arriving in the first PDU session;and the first condition further includes that the status of the UE isswitched from the idle state to the connected state.

With reference to the fourth aspect or the first possible implementationof the fourth aspect, in a second possible implementation of the fourthaspect, the method provided in this embodiment of the present inventionfurther includes: when determining that the UE moves out of the areacorresponding to the first PDU session, marking, by the UE, the firstPDU session with a to-be-updated state. In this way, the UE may directlysend the second message to the target entity when determining that theUE is switched from the idle state to the connected state or when the UEhas the uplink data arriving in the first PDU session.

With reference to any one of the fourth aspect to the second possibleimplementation of the fourth aspect, in a third possible implementationof the fourth aspect, if the target entity is the session managementfunction SMF entity, the second message is a PDU session modificationrequest message that is sent by the UE to the SMF entity and thatcarries at least one of location information of the UE and a secondindication, where the second indication is used to indicate that the UEmoves out of the area corresponding to the first PDU session.

With reference to any one of the fourth aspect to the third possibleimplementation of the fourth aspect, in a fourth possible implementationof the fourth aspect, the target entity is an access and mobilitymanagement function AMF entity, and the second message is a servicerequest message sent by the UE to the AMF entity, where the servicerequest message carries a first indication, and the first indication isused to indicate that the UE moves out of the area corresponding to thefirst PDU session.

With reference to any one of the fourth aspect to the fourth possibleimplementation of the fourth aspect, in a fifth possible implementationof the fourth aspect, the second message is a registration requestmessage sent by the UE to the AMF entity, the registration requestmessage carries a first cause value, and the first cause value is usedto indicate that the UE moves out of the area corresponding to the firstPDU session.

With reference to any one of the fourth aspect to the fifth possibleimplementation of the fourth aspect, in a sixth possible implementationof the fourth aspect, after the UE determines that the UE moves out ofthe area corresponding to the first PDU session, and sends the secondmessage to the target entity, the method provided in this embodiment ofthe present invention further includes: receiving, by the UE, a thirdmessage that is sent by the target entity and that includes a firstarea, where the first area is an updated area of the first PDU session;and updating, by the UE based on the third message to the first area,the area corresponding to the first PDU session.

With reference to any one of the fourth aspect to the sixth possibleimplementation of the fourth aspect, in a seventh possibleimplementation of the fourth aspect, the third message further includesa first IP address, and the first IP address is an updated IP address ofthe first PDU session; and the method further includes: updating, by theUE to the first IP address, an IP address corresponding to the first PDUsession.

With reference to any one of the fourth aspect to the seventh possibleimplementation of the fourth aspect, in an eighth possibleimplementation of the fourth aspect, when the target entity is the SMFentity, the third message is a PDU session modification accept messagesent by the AMF entity to the UE; or when the target entity is the AMFentity, the third message is a service accept message sent by the AMFentity to the UE; or when the target entity is the AMF entity, the thirdmessage is a registration accept message sent by the AMF entity to theUE.

According to a fifth aspect, an embodiment of the present inventionprovides a session management method, including: in a process in whichuser equipment UE establishes a first protocol data unit PDU sessionwith a session management function SMF entity, sending, by the SMFentity to the UE, a first message that includes an area corresponding tothe first PDU session; receiving, by the SMF entity, a second messagethat is sent by the UE and that is used to indicate that the UE movesout of the area corresponding to the first PDU session; and updating, bythe SMF entity based on the second message, the area corresponding tothe first PDU session, or reselecting a second UPF entity based on thesecond message to establish a second PDU session.

With reference to the fifth aspect, in a first possible implementationof the fifth aspect, the method further includes: sending, by the SMFentity, a third message to the UE, where the third message carries afirst area, and the first area is an updated area of the first PDUsession.

With reference to the fifth aspect or the first possible implementationof the fifth aspect, in a second possible implementation of the fifthaspect, the third message further carries a first IP address, and thefirst IP address is an updated IP address of the first PDU session.

With reference to any one of the fifth aspect to the second possibleimplementation of the fifth aspect, in a third possible implementationof the fifth aspect, the first message carries a first indication thatis used to instruct the UE to send the second message to the SMF entitywhen the UE determines that the UE moves out of the area correspondingto the first PDU session.

With reference to any one of the fifth aspect to the third possibleimplementation of the fifth aspect, in a fourth possible implementationof the fifth aspect, the first indication is further used to instructthe UE to send the second message to the SMF entity when a status of theUE is switched from an idle state to a connected state or when the UEhas uplink data arriving in the first PDU session.

With reference to any one of the fifth aspect to the fourth possibleimplementation of the fifth aspect, in a fifth possible implementationof the fifth aspect, the second message carries location information ofthe UE, and the updating, by the SMF entity based on the second message,the area corresponding to the first PDU session, or reselecting a secondUPF entity based on the second message to establish a second PDU sessionincludes: if a session and service continuity mode of the first PDUsession is a first session mode or a second session mode, whendetermining that the UE moves out of the area corresponding to the firstPDU session and that the UE is inside a service area of a user planefunction UPF entity corresponding to the first PDU session, updating, bythe SMF entity, the area corresponding to the first PDU session; orreselecting, by the SMF entity, a second UPF entity when determiningthat the UE moves out of the area corresponding to the first PDU sessionand that the UE moves out of a service area of a UPF entitycorresponding to the first PDU session.

According to a sixth aspect, an embodiment of the present inventionprovides user equipment, where the user equipment UE has a firstprotocol data unit PDU session, and the UE includes: a sending unit,configured to send a service request message to an access and mobilitymanagement function AMF entity; a receiving unit, configured to receivea first message sent by the AMF entity; and a determining unit,configured to determine, by the UE based on the first message, tore-establish or modify the first PDU session.

With reference to the sixth aspect, in a first possible implementationof the sixth aspect, the first message is a service accept message, theservice accept message carries an identifier of the first PDU sessionand a first indication, the identifier is used to identify the first PDUsession, and the first indication is used to instruct to re-establish ormodify the first PDU session associated with the identifier.

With reference to the sixth aspect or the first possible implementationof the sixth aspect, in a second possible implementation of the sixthaspect, the determining unit is configured to: if the first indicationis used to instruct the UE to modify the first PDU session associatedwith the identifier, determine, by the UE based on the identifier andthe first indication, to modify the first PDU session; or if the firstindication is used to instruct the UE to re-establish the first PDUsession associated with the identifier, determine, based on theidentifier and the first indication, to re-establish the first PDUsession.

With reference to any one of the sixth aspect to the second possibleimplementation of the sixth aspect, in a third possible implementationof the sixth aspect, the first message is a service accept message, theservice accept message carries an identifier of the first PDU session,the identifier is used to instruct to re-establish or modify the firstPDU session associated with the identifier, and the determining unitincludes: determining, based on the identifier, to re-establish ormodify the first PDU session.

With reference to any one of the sixth aspect to the third possibleimplementation of the sixth aspect, in a fourth possible implementationof the sixth aspect, the first message is a service reject message, theservice reject message carries an identifier of the first PDU sessionand a cause value, the identifier is used to identify the first PDUsession, and the cause value indicates that the UE moves out of an areacorresponding to the first PDU session associated with the identifier.

With reference to any one of the sixth aspect to the fourth possibleimplementation of the sixth aspect, in a fifth possible implementationof the sixth aspect, the determining unit is further configured todetermine, by the UE based on the identifier and the cause value, tore-establish or modify the first PDU session associated with theidentifier.

With reference to any one of the first aspect to the sixth possibleimplementation of the first aspect, in a seventh possible implementationof the first aspect, the sending unit is further configured to send, bythe UE to the AMF entity, a second message used to request tore-establish or modify the first PDU session.

According to a seventh aspect, an embodiment of the present inventionprovides an SMF entity, where user equipment UE has a first protocoldata unit PDU session, and the SMF entity includes: a receiving unit,configured to receive a first message that is sent by an access andmobility management function AMF entity and that is used to instruct theSMF entity to determine whether the UE moves out of an areacorresponding to the first PDU session; and a sending unit, configuredto: when determining, based on the first message, that the UE moves outof a service area of a UPF entity corresponding to the first PDUsession, send, by the SMF entity to the UE by using the AMF entity, afirst parameter that is used to instruct the UE to send a request usedto re-establish or modify the first PDU session.

With reference to the seventh aspect, in a first possible implementationof the seventh aspect, the first parameter includes an identifier of thefirst PDU session and a first indication, the identifier is used toidentify the first PDU session, and the first indication is used toinstruct the UE to send a request used to re-establish or modify thefirst PDU session associated with the identifier.

With reference to the seventh aspect or the first possibleimplementation of the seventh aspect, in a second possibleimplementation of the seventh aspect, the sending unit is furtherconfigured to send, to the AMF entity, the area corresponding to thefirst PDU session; or the sending unit is further configured to send, tothe AMF entity, an identifier of the user plane function UPF entitycorresponding to the first PDU session, where the identifier of the UPFentity is used by the AMF entity to determine the area corresponding tothe first PDU session.

With reference to any one of the seventh aspect to the second possibleimplementation of the seventh aspect, in a third possible implementationof the seventh aspect, the first message carries location information ofthe UE, or the first message carries a second indication used toindicate that the UE moves out of the area corresponding to the firstPDU session.

With reference to any one of the seventh aspect to the third possibleimplementation of the seventh aspect, in a fourth possibleimplementation of the seventh aspect, the SMF entity further includes: adetermining unit, configured to determine a session continuity mode ofthe first PDU session, where the sending unit is specifically configuredto: when the SMF entity determines that the session continuity mode ofthe first PDU session is a first session mode or a second session mode,send, by the SMF entity, the first parameter to the UE by using the AMFentity.

According to an eighth aspect, an embodiment of the present inventionprovides an access and mobility management function AMF entity, whereuser equipment UE has a first protocol data unit PDU session, and theAMF entity provided in this embodiment of the present inventionincludes: a sending unit, configured to: when determining that a servicerequest message sent by the UE is received, send, to an SMF entity, afirst message that is used by the SMF entity to determine whether alocation of the UE is outside an area corresponding to the first PDUsession; and a receiving unit, configured to receive a first parameterthat is sent by the SMF entity and that is used to instruct the UE tosend a request used to re-establish or modify the first PDU session,where the sending unit is configured to send the first parameter to theUE.

With reference to the eighth aspect, in a first possible implementationof the eighth aspect, the first parameter includes an identifier of thefirst PDU session and a first indication, the identifier is used toidentify the first PDU session, and the first indication is used toinstruct the UE to send a request used to re-establish the first PDUsession associated with the identifier.

With reference to the eighth aspect or the first possible implementationof the eighth aspect, in a second possible implementation of the eighthaspect, the access and mobility management function AMF entity furtherincludes: a receiving unit, configured to receive the area that iscorresponding to the first PDU session and that is sent by the SMFentity; or a receiving unit, configured to receive an identifier that isof a UPF entity corresponding to the first PDU session and that is sentby the SMF entity, where the identifier of the UPF entity is used by theAMF entity to determine the area corresponding to the first PDU session.

With reference to any one of the eighth aspect to the second possibleimplementation of the eighth aspect, in a third possible implementationof the eighth aspect, the first message carries location information ofthe UE or a second indication used to indicate that the location of theUE is outside the area corresponding to the first PDU session.

According to a ninth aspect, an embodiment of the present inventionprovides user equipment, including: a receiving unit, configured to: ina process in which the user equipment UE establishes a first protocoldata unit PDU session with a session management function SMF entity,receive a first message that is sent by the SMF entity and that includesan area corresponding to the first PDU session; and a sending unit,configured to: when determining, based on the area corresponding to thefirst PDU session, that the UE meets a first condition, send, to atarget entity, a second message used to indicate that the UE moves outof the area corresponding to the first PDU session, where the firstcondition includes that the UE moves out of the area corresponding tothe first PDU session.

With reference to the ninth aspect, in a first possible implementationof the ninth aspect, the first message further includes a firstindication, and the first indication is used to instruct the UE to sendthe second message to the target entity after the UE determines that theUE moves out of the area corresponding to the first PDU session, andwhen a status of the UE is switched from an idle state to a connectedstate or when the UE has uplink data arriving in the first PDU session;and the first condition further includes that the status of the UE isswitched from the idle state to the connected state.

With reference to the ninth aspect or the first possible implementationof the ninth aspect, in a second possible implementation of the ninthaspect, the UE provided in this embodiment of the present inventionfurther includes: a marking unit, configured to mark the first PDUsession with a to-be-updated state when determining that the UE movesout of the area corresponding to the first PDU session.

With reference to any one of the ninth aspect to the second possibleimplementation of the ninth aspect, in a third possible implementationof the ninth aspect, if the target entity is the session managementfunction SMF entity, the second message is a PDU session modificationrequest message that is sent by the UE to the SMF entity and thatcarries at least one of location information of the UE and a secondindication, where the second indication is used to indicate that the UEmoves out of the area corresponding to the first PDU session.

With reference to any one of the ninth aspect to the third possibleimplementation of the ninth aspect, in a fourth possible implementationof the ninth aspect, the target entity is an access and mobilitymanagement function AMF entity, and the second message is a servicerequest message sent by the UE to the AMF entity, where the servicerequest message carries a first indication used to indicate that the UEmoves out of the area corresponding to the first PDU session.

With reference to any one of the ninth aspect to the fourth possibleimplementation of the ninth aspect, in a fifth possible implementationof the ninth aspect, the second message is a registration requestmessage sent by the UE to the AMF entity, and the registration requestmessage carries a first cause value used to indicate that the UE movesout of the area corresponding to the first PDU session.

With reference to any one of the ninth aspect to the fifth possibleimplementation of the ninth aspect, in a sixth possible implementationof the ninth aspect, the UE provided in this embodiment of the presentinvention further includes: a receiving unit, configured to receive athird message that is sent by the target entity and that includes afirst area, where the first area is an updated area of the first PDUsession; and the UE provided in this embodiment of the present inventionfurther includes: an updating unit, configured to update, based on thethird message to the first area, the area corresponding to the first PDUsession.

With reference to any one of the ninth aspect to the sixth possibleimplementation of the ninth aspect, in a seventh possible implementationof the ninth aspect, the third message further includes a first IPaddress, the first IP address is an updated IP address of the first PDUsession, and the updating unit is configured to update, by the UE to thefirst IP address, an IP address corresponding to the first PDU session.

With reference to any one of the ninth aspect to the seventh possibleimplementation of the ninth aspect, in an eighth possible implementationof the ninth aspect, when the target entity is the SMF entity, the thirdmessage is a PDU session modification accept message sent by the AMFentity to the UE; or when the target entity is the AMF entity, the thirdmessage is a service accept message sent by the AMF entity to the UE; orwhen the target entity is the AMF entity, the third message is aregistration accept message sent by the AMF entity to the UE.

According to a tenth aspect, an embodiment of the present inventionprovides a session management function SMF entity, including: a sendingunit, configured to: in a process in which user equipment UE establishesa first protocol data unit PDU session with the session managementfunction SMF entity, send, to the UE, a first message that includes anarea corresponding to the first PDU session; a receiving unit,configured to receive a second message that is sent by the UE and thatis used to indicate that the UE moves out of the area corresponding tothe first PDU session; and a processing unit, configured to: update,based on the second message, the area corresponding to the first PDUsession, or reselect a second UPF entity based on the second message toestablish a second PDU session.

With reference to the tenth aspect, in a first possible implementationof the tenth aspect, the sending unit provided in this embodiment of thepresent invention is further configured to send, to the UE, a thirdmessage that carries a first area, where the first area is an updatedarea of the first PDU session.

With reference to the tenth aspect or the first possible implementationof the tenth aspect, in a second possible implementation of the tenthaspect, the third message further carries a first IP address, and thefirst IP address is an updated IP address of the first PDU session.

With reference to any one of the tenth aspect to the second possibleimplementation of the tenth aspect, in a third possible implementationof the tenth aspect, the first message carries a first indication thatis used to instruct the UE to send the second message to the SMF entitywhen the UE determines that the UE moves out of the area correspondingto the first PDU session.

With reference to any one of the tenth aspect to the third possibleimplementation of the tenth aspect, in a fourth possible implementationof the tenth aspect, the first indication is further used to instructthe UE to send the second message to the SMF entity when a status of theUE is switched from an idle state to a connected state or when the UEhas uplink data arriving in the first PDU session.

With reference to any one of the tenth aspect to the fourth possibleimplementation of the tenth aspect, in a fifth possible implementationof the tenth aspect, the second message carries location information ofthe UE, and the processing unit is specifically configured to: if asession and service continuity mode of the first PDU session is a firstsession mode or a second session mode, when the SMF entity determinesthat the UE moves out of the area corresponding to the first PDU sessionand that the UE is inside a service area of a user plane function UPFentity corresponding to the first PDU session, update the areacorresponding to the first PDU session; or reselect a second UPF entitywhen the SMF entity determines that the UE moves out of the areacorresponding to the first PDU session and that the UE moves out of aservice area of a UPF entity corresponding to the first PDU session.

According to an eleventh aspect, an embodiment of the present inventionprovides user equipment, including a memory, a processor, a bus, and atransceiver, where the memory stores code and data, the processor andthe memory are connected by using the bus, and the processor runs thecode in the memory, so that the user equipment performs the sessionmanagement method described in any one of the first aspect to the sixthpossible implementation of the first aspect, or the session managementmethod described in any one of the fourth aspect to the eighth possibleimplementation of the fourth aspect.

According to a twelfth aspect, an embodiment of the present inventionprovides a session management function SMF entity, including a memory, aprocessor, a bus, and a transceiver, where the memory stores code anddata, the processor and the memory are connected by using the bus, andthe processor runs the code in the memory, so that the SMF entityperforms the session management method described in any one of thesecond aspect to the fourth possible implementation of the secondaspect, or the session management method described in any one of thefifth aspect to the fifth possible implementation of the fifth aspect.

According to a thirteenth aspect, an embodiment of the present inventionprovides an access and mobility management function AMF entity,including a memory, a processor, a bus, and a transceiver, where thememory stores code and data, the processor and the memory are connectedby using the bus, and the processor runs the code in the memory, so thatthe AMF entity performs the session management method described in anyone of the third aspect to the fourth possible implementation of thethird aspect.

According to a fourteenth aspect, an embodiment of the present inventionprovides a computer readable storage medium, including an instruction,and when the computer readable storage medium runs on an AMF entity, theAMF entity performs the session management method described in any oneof the third aspect to the fourth possible implementation of the thirdaspect; or when the computer readable storage medium runs on an SMFentity, the SMF entity performs the session management method describedin any one of the second aspect to the fourth possible implementation ofthe second aspect, or the session management method described in any oneof the fifth aspect to the fifth possible implementation of the fifthaspect; or when the computer readable storage medium runs on userequipment, the user equipment performs the session management methoddescribed in any one of the first aspect to the sixth possibleimplementation of the first aspect, or the session management methoddescribed in any one of the fourth aspect to the eighth possibleimplementation of the fourth aspect.

According to a fifteenth aspect, an embodiment of the present inventionprovides a session management system, including the AMF entity describedin the thirteenth aspect or the eighth aspect, the SMF entity describedin the twelfth aspect, in any one of the seventh aspect to the fourthpossible implementation of the seventh aspect, or in any one of thetenth aspect to the fifth possible implementation of the tenth aspect,and the user equipment described in the sixth aspect or the eleventhaspect.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a first schematic flowchart of a session establishment methodin the prior art;

FIG. 2 is a second schematic flowchart of a session management method inthe prior art;

FIG. 3 is a third schematic flowchart of a session management method inthe prior art;

FIG. 4 is an architectural diagram of a system to which a sessionmanagement method is applied according to an embodiment of the presentinvention;

FIG. 5 is a schematic structural diagram of an AMF entity according toan embodiment of the present invention;

FIG. 6 is a schematic structural diagram of an SMF entity according toan embodiment of the present invention;

FIG. 7 is a schematic structural diagram of UE according to anembodiment of the present invention;

FIG. 8 is a first schematic flowchart of a session management methodaccording to an embodiment of the present invention;

FIG. 9A and FIG. 9B are a second schematic flowchart of a sessionmanagement method according to an embodiment of the present invention;

FIG. 10A and FIG. 10B are a third schematic flowchart of a sessionmanagement method according to an embodiment of the present invention;

FIG. 11A and FIG. 11B are a fourth schematic flowchart of a sessionmanagement method according to an embodiment of the present invention;

FIG. 12A, FIG. 12B, and FIG. 12C are a fourth schematic flowchart of asession management method according to an embodiment of the presentinvention;

FIG. 13A, FIG. 13B, and FIG. 13C are a fifth schematic flowchart of asession management method according to an embodiment of the presentinvention;

FIG. 14A, FIG. 14B, and FIG. 14C are a schematic flowchart of specificuse of a session management method according to an embodiment of thepresent invention;

FIG. 15A, FIG. 15B, and FIG. 15C are a schematic flowchart of specificuse of another session management method according to an embodiment ofthe present invention;

FIG. 16 is a first schematic structural diagram of an AMF entityaccording to an embodiment of the present invention;

FIG. 17 is a second schematic structural diagram of an AMF entityaccording to an embodiment of the present invention;

FIG. 18 is a first schematic structural diagram of an SMF entityaccording to an embodiment of the present invention;

FIG. 19 is a second schematic structural diagram of an SMF entityaccording to an embodiment of the present invention;

FIG. 20 is a first schematic structural diagram of user equipmentaccording to an embodiment of the present invention;

FIG. 21 is a second schematic structural diagram of user equipmentaccording to an embodiment of the present invention;

FIG. 22 is a third schematic structural diagram of user equipmentaccording to an embodiment of the present invention; and

FIG. 23 is a third schematic structural diagram of an SMF entityaccording to an embodiment of the present invention.

DESCRIPTION OF EMBODIMENTS

To facilitate clear description of the technical solutions in theembodiments of the present invention, words such as “first” and“second”, are used in the embodiments of the present invention todistinguish between same items or similar items with basically samefunctions or purposes. A person skilled in the art may understand thatthe words such as “first” and “second” do not restrict a quantity and animplementation sequence.

In the embodiments of the present invention, a PDU session is aconnection between UE and a data network that is used to provide aconnection service. A type of the connection may include an IP type, anEthernet type (Ethernet type), and a non-IP type.

An idle state or a connected state in the embodiments of the presentinvention is a connection management (Connection Management) status ofUE. That the UE is in an idle state means that the connection managementstatus of the UE is the idle state, namely, CM-IDLE.

That the UE is in a connected state means that the connection managementstatus of the UE is the connected state, namely, CM-CONNECTED.

In the embodiments of the present invention, an active status of asession means whether a user plane connection that is corresponding tothe session and that is between UE and a UPF entity exists, includingwhether a DRB (data radio bearer) between the UE and a base station andan N3 connection between the base station and the UPF entity exist.

That the session is in an active state means that the user planeconnection that is corresponding to the session and that is between theUE and the UPF entity exists. To be specific, the DRB and the N3connection that are corresponding to the session both exist. The UE candirectly receive and send data in the session.

That the session is in an inactive state means that the user planeconnection between the UE and the UPF entity does not exist.Specifically, at least one of the data radio bearer (data radio bearer,DRB) between the UE and the base station, and the N3 connection betweenthe base station and the UPF entity does not exist. The UE cannotdirectly receive and send data in the session. If in the session, thereis uplink data that needs to be sent, or when there is downlink dataarriving in the session, the UE first needs to perform a service requestprocedure to activate the session, and the UE can receive and send dataonly after the session is switched to an active state.

It may be understood that, that a session is in an active state or aninactive state is specific to an established session.

In the embodiments of the present invention, a UPF service area meansthat for a PDU session, provided that a location of UE is inside theservice area, a redirection (namely, relocation) process does not needto be performed on a UPF entity corresponding to the PDU session. TheUPF service area may be a set of base stations that a UPF entity cancontrol or to which the UPF entity can be connected, a set of trackingareas (Tracking Area) to which these base stations belong, or a set ofcells (cell) that these base stations include.

In the embodiments of the present invention, an area corresponding to aPDU session is a UPF service area of a UPF entity that serves the PDUsession, or a particular quantity of subsets selected by using UE as acenter from a UPF service area of a UPF entity that serves the PDUsession, or a set of a service area of a UPF entity that serves the PDUsession and a service area of an adjacent UPF entity that has a samefunction as the UPF entity, where the set is selected by UE as a center.It should be noted that, the UPF entity may be an anchor UPF entity thatserves the PDU session, or may be another UPF entity that serves the PDUsession.

It should be noted that a use scenario of the embodiments of the presentinvention is as follows: UE has a first PDU session. When the first PDUsession is in an inactive state, and when a UPF entity corresponding tothe first PDU session cannot serve the first PDU session (for example,the UE is outside a service area of the UPF entity corresponding to thefirst PDU session) as a location of the UE moves, a network or the UEtriggers UPF relocation. That the first PDU session in the scenario isin an inactive state includes the following case: The UE is in an idlestate, or the UE is in a connected state but the session is in aninactive state.

A service continuity mode of a first PDU session in the embodiments ofthe present invention may be a first session mode (also referred to asSSC1). The SSC1 means that a network triggers releasing of the first PDUsession and instructs UE to re-establish the first PDU session, and thata re-established first PDU session has a same DN as the first PDUsession. Certainly, the re-established first PDU session may beunderstood as a second PDU session, and the second PDU session mayreplace the first PDU session. As shown in FIG. 2, when determining thata UPF entity needs to be relocated, an SMF entity sends, to userequipment by using an AMF entity, a request message (for example, arequest message shown in FIG. 2) used to instruct to re-establish asession. The SMF entity first releases a first PDU session establishedwith the user equipment by using a first UPF entity. Then the SMF entityestablishes, by using a second UPF entity, a second PDU session with theuser equipment based on a session management connection request sent bythe user equipment. Finally, the UE sends data by using the second UPFentity that serves the second PDU session. To be specific, the first PDUsession is released before the second PDU session is established.

As shown in FIG. 3, a service continuity mode of a first PDU session inthe embodiments of the present invention may be a second session mode(also referred to as a session and service continuity second sessionmode, SSC2). The SSC2 means that a network allows that a second PDUsession (a connection established between UE and a second UPF entity) isfirst established before a first PDU session (a connection establishedbetween the UE and a first UPF entity) is released. To be specific, anSMF entity first sends a first message to the UE by using an AMF entity.The first message is used to instruct the user equipment to send asession management connection request in a session release time, so thatthe SMF entity establishes a second PDU session with the user equipmentby using the second UPF entity, and the SMF entity releases, after thesession release time arrives, a first PDU session established with theuser equipment, that is, a first PDU session established by the SMFentity with the user equipment by using the first UPF entity. To bespecific, the first PDU session is released by the SMF entity after thesecond PDU session is established.

The SSC1 means that a network side may trigger releasing of a first PDUsession and instruct UE to immediately establish a second PDU session,and that the second PDU session has a same data network DN as the firstPDU session. In the SSC1, the first PDU session is first released, andthen the second PDU session is established.

The SSC2 means that a network side may trigger UE to establish a secondPDU session, and that the second PDU session has a same data network DNas a first PDU session. In the SSC2, the second PDU session is firstestablished, and then the first PDU session is released.

The service continuity mode of the first PDU session in the embodimentsof the present invention is mainly the first mode or the second mode,and certainly, may be another mode. The service continuity mode of thefirst PDU session is not specially limited in the present invention. Forthe first session mode and the second session mode, a UPF entity may berelocated. In this way, a session in the first session mode and that inthe second session mode each are related to a particular area (forexample, a UPF service area). However, in a conventional solution, it isonly defined that an SMF entity relocates a UPF entity when the firstsession is in an active state. However, regardless of whether the SMFentity uses the session and service continuity first session mode or thesession and service continuity second session mode, it is not definedhow to relocate a UPF entity if the first session is in an inactivestate (UE is in an idle state, or the UE is in a connected state but thesession is in an inactive state). As a result, a UPF entity relocationprocedure is not performed for the first session in an inactive state,and a location of the UE may be outside a service area of a first UPFentity as the UE moves. Consequently, when the UE has data to besent/received and enters a connected state, a base station cannotestablish a connection to a UPF entity that serves the first session,and the UE cannot normally receive/send data in the first session.

In an aspect, when the UE is started to activate the first PDU session(establish a user plane connection of the first PDU session) or responseto paging, the SMF entity determines, based on the location of the UE, aUPF service area corresponding to the first PDU session, a mode of thefirst PDU session, and a carrier policy, whether a UPF entity needs tobe relocated. To be specific, when determining that the location of theUE is outside the service area of the UPF entity, the SMF entitydetermines to relocate a UPF entity; or when determining that thelocation of the UE is outside the service area of the UPF entity, theSMF entity determines, with reference to the mode of the first PDUsession (the first session mode or the second session mode) and/or thecarrier policy, to relocate a UPF entity. If a UPF entity needs to bedirected, the SMF entity sends, by using an AMF entity to the UE, anidentifier of the first PDU session and an indication used tore-establish or modify the first PDU session. After the SMF entitysends, by using an N11 message to the AMF entity, the identifier of thefirst PDU session and the indication used to re-establish or modify thefirst PDU session, the AMF entity may encapsulate the identifier and theindication into a service accept message, and send the service acceptmessage to the UE. Alternatively, the SMF entity may encapsulate theidentifier and the indication into N1 SM information and sends the N1 SMinformation to the AMF entity, and then the AMF entity encapsulates theidentifier and the indication into a service accept message and sendsthe service accept message to the UE. After the UE receives theidentifier carrying the first PDU session and the indication used tore-establish the first PDU session, the UE requests to establish asecond PDU session. In a process of establishing the second PDU session,the SMF entity selects a new UPF entity to serve the second PDU session.After the UE receives the identifier carrying the first PDU session andthe indication used to modify the first PDU session, in a possibleimplementation, the UE triggers a PDU session modification procedure, tobe specific, the UE sends a PDU session modification request message; inanother more possible implementation, a network triggers a PDU sessionmodification procedure. In the session modification process, the UPFentity corresponding to the first PDU session is relocated to a secondUPF entity from the first UPF entity. (It may be understood that, in anembodiment of re-establishing the first PDU session in the presentinvention, the established second PDU session may be used to replace thefirst PDU session. The second PDU session and the first PDU session havea same DN. After re-establishment is completed, the original first PDUsession may be deleted in a signaling manner, or may be deleted on acore network side (for example, the SMF entity/the AMF entity) and a UEside, to be specific, the UE locally deletes the original first PDUsession.).

In another aspect, once the UE is outside an area corresponding to thefirst PDU session (for example, the service area of the UPF entity), UPFentity relocation is triggered. In this case, in a process in which theUE establishes the first PDU session with the SMF entity, the SMF entityprovides, for the UE, the area corresponding to the first PDU session.In this way, when the UE is in an idle state, and when the UE detectsthat the UE moves out of the area corresponding to the first PDUsession, the UE triggers a NAS procedure (for example, triggers a PDUsession modification procedure or a registration request procedure toupdate the area corresponding to the first PDU session, or triggers aservice request procedure). In this process, the SMF entity determineswhether to perform UPF relocation. In this way, it may be ensured thatUPF entity relocation is performed before data is transmitted, so as toensure that data is not lost. In this embodiment, the area correspondingto the first PDU session may be the service area of the UPF entitycorresponding to the first PDU session, a particular quantity of subsetsselected from the service area of the UPF entity by using the UE as acenter (for example, a particular quantity of base stations or aparticular quantity of tracking areas), or a set of service areas thatare of adjacent UPF entities and that use the UE as a center.

As shown in FIG. 4, FIG. 4 is an architectural diagram of a system towhich a session management method is applied according to an embodimentof the present invention. The system includes an access and mobilitymanagement function AMF entity 10, one or more session managementfunction SMF entities 20, one or more user equipments UEs 30, a datanetwork (Data Network, DN) 40, one or more user plane function UPFentities 50, an access station ((Radio) Access Node, (radio) accessstation) 60, a packet control function (Packet Control Function, PCF)entity 70, an application function (application function, AF) entity 80,a unified data management (Unified Data Management, UDM) entity 90configured to store user subscription information, and an authenticationserver function (Authentication Server Function, AUSF) entity 00.

The access and mobility management function AMF entity 10 is configuredto select an SMF entity based on a session connection establishmentrequest sent by the UE 30, so that the selected SMF entity establishes afirst PDU session between the UE 30 and the UPF entity 50.

The AMF entity 10 is further configured to forward, to the userequipment, a first message sent by the SMF entity. The first message isused to instruct the user equipment to send a second message (forexample, a session connection establishment request message) used torequest to establish the first PDU session. The second message is usedto instruct to establish the first PDU session. In this way, afterreceiving the second message, the SMF entity may establish the first PDUsession between the UE 30 and the UPF entity based on the secondmessage.

Optionally, the AMF entity 10 stores a mapping relationship between anidentifier of the first PDU session and the SMF entity that establishesthe first PDU session, and is configured to establish a mappingrelationship between identification information and the SMF entity basedon the identification information configured by the SMF entity. In thisway, in a session re-establishment process, the AMF entity maydetermine, based on the identifier of the first PDU session, an SMFentity to which a session re-establishment request is forwarded.

Optionally, the AMF entity 10 is further configured to: receive an areathat is corresponding to the first PDU session and that is sent by theSMF entity or a service area that is of a UPF entity corresponding tothe first PDU session and that is sent by the SMF entity; and store thearea corresponding to the first PDU session or the service area of theUPF entity corresponding to the first PDU session. The AMF entity isfurther configured to: obtain location information of the UE based on aservice request message sent by the UE; determine, based on the locationinformation of the UE, whether a location of the UE is outside the areacorresponding to the first PDU session; and then, when determining thatthe location of the UE is outside the area corresponding to the firstPDU session, send, to the UE, a request message used to determine tore-establish the first PDU session, or send, to the SMF entity, thelocation information of the UE or a message indicating that the locationof the UE is outside the area corresponding to the first PDU session.

The SMF entity 20 is configured to reallocate a UPF entity to the UEbased on the location information of the UE 30 or a feature of data sentby the UE 30 or a location between the UPF entity 50 and the UE 30, andquality of service of a UPF entity, so as to re-establish a second PDUsession between the UE and the newly allocated UPF entity, so that there-established second PDU session can optimize a user plane. The SMFentity 20 is further configured to configure identification information.The identification information is used to instruct the AMF entity tosend, to the SMF entity, a request used to re-establish the second PDUsession. The session management function entity 20 is further configuredto establish a session between the UE 30 and the UPF entity 50, such asa protocol data unit (Protocol Data Unit, PDU) session. The PDU sessionis used to connect the UE 30 and the DN 40, and the PDU session is usedto provide a PDU data packet.

The SMF entity is further configured to receive the location informationof the UE and an indication indicating that the location of the UE isoutside the first PDU session, where the location information and theindication are sent by the AMF entity; and when the location of the UEis outside the area corresponding to the first PDU session, instruct theUE to establish a second PDU session to replace the first PDU session.The SMF entity is further configured to: send, to the UE, the areacorresponding to the first PDU session; and send, to the AMF entity, thearea corresponding to the first PDU session or the service area of theUPF entity corresponding to the first PDU session. The SMF entity isfurther configured to: when determining that the location of the UE isoutside the area corresponding to the first PDU session but inside theservice area of the UPF entity corresponding to the first PDU session,reallocate, to the UE, an area corresponding to the first PDU session.

The UE in this embodiment of the present invention is configured to:receive the area that is of the first PUU session and that is sent bythe SMF entity; and when the location of the UE is outside the areacorresponding to the first PDU session, send, to the AMF entity, anindication indicating that the location of the UE is outside the area ofthe first PDU session, so as to trigger the AMF entity/the SMF entity toperform relocation.

The plurality of user equipments UEs 30 are configured to communicatewith the DN based on an established session.

The data network DN 40 is an external network configured to provide adata service.

The access station 60 is configured to provide a data service for the UE30, for example, receive data sent by the UE 30 or send data to the UE30. The access station 60 may be a base station in an actual useprocess. In this embodiment of the present invention, a base station(base station, BS) may be a device that communicates with the userequipment (user equipment, UE) or another communications station such asa relay station, and the base station may provide communication coveragein a specific physical area.

The PCF entity 70 is configured to be used as an interface between aradio frequency part and a packet network (an IP network).

The AF entity 80 is configured to play an effect on routing.

For example, as shown in FIG. 4, the AMF entity 10 and the SMF entity 20communicate with each other through an interface N11. The AMF entity 10and the UE 30 communicate with each other through an interface N1. TheAMF entity 10 and the access station 60 communicate with each otherthrough an interface N2. The AMF entity 10 and the AUSF entity 00communicate with each other through an interface N12. The AMF entity 10and the UDM entity communicate with each other through an interface N8.The AMF entity 10 and the PCF entity communicate with each other throughan interface N15. The SMF entity 20 and the UDM entity 90 communicatewith each other through an interface N10. The SMF entity 20 and the UPFentity 50 communicate with each other through an interface N4. The UPFentity 50 and the data network 40 communicate with each other through aninterface N6. The PCF entity and the AF entity communicate with eachother through an interface N5.

FIG. 5 is a schematic structural diagram of an AMF entity according toan embodiment of the present invention. It may be learned from FIG. 5that an AMF entity 10 includes a processor 101, a transceiver 102, amemory 104, and a bus 103. The transceiver 102, the processor 101, andthe memory 104 are interconnected by using the bus 103. The bus 103 maybe a PCI bus, an EISA bus, or the like. The bus may be classified intoan address bus, a data bus, a control bus, and the like. For ease ofrepresentation, only one bold line is used in FIG. 5, but it does notindicate that there is only one bus or one type of bus. The memory 104is configured to store program code and data of the AMF entity 10. Thetransceiver 102 is configured to support the AMF entity 10 incommunicating with another device. The processor 101 is configured tosupport the AMF entity 10 in executing the program code and the datastored in the memory 104, to implement a session management methodprovided in the embodiments of the present invention.

FIG. 6 is a schematic structural diagram of an SMF entity according toan embodiment of the present invention. It may be learned from FIG. 6that an SMF entity 20 includes a processor 201, a transceiver 202, amemory 204, and a bus 203. The transceiver 202, the processor 201, andthe memory 204 are interconnected by using the bus 203. The bus 203 maybe a PCI bus, an EISA bus, or the like. The bus may be classified intoan address bus, a data bus, a control bus, and the like. For ease ofrepresentation, only one bold line is used in FIG. 6, but it does notindicate that there is only one bus or one type of bus. The memory 204is configured to store program code and data of the SMF entity 20. Thetransceiver 202 is configured to support the SMF entity 20 incommunicating with another device. The processor 201 is configured tosupport the SMF entity 20 in executing the program code and the datastored in the memory 204, to implement a session management methodprovided in the embodiments of the present invention.

FIG. 7 is a schematic structural diagram of user equipment according toan embodiment of the present invention. It may be learned from FIG. 7that user equipment 30 includes a processor 301, a transceiver 302, amemory 304, and a bus 303. The transceiver 302, the processor 301, andthe memory 304 are interconnected by using the bus 303. The bus 303 maybe a PCI bus, an EISA bus, or the like. The bus may be classified intoan address bus, a data bus, a control bus, and the like. For ease ofrepresentation, only one bold line is used in FIG. 7, but it does notindicate that there is only one bus or one type of bus. The memory 304is configured to store program code and data of the user equipment 30.The transceiver 302 is configured to support the user equipment 30 incommunicating with another device. The processor 301 is configured tosupport the user equipment 30 in executing the program code and the datastored in the memory 304, to implement a session management methodprovided in the embodiments of the present invention.

In the embodiments of the present invention, UE may be distributed in anentire wireless network, and each UE may be stationary or in motion.

The UE may be a terminal (terminal), a mobile station (mobile station),a subscriber unit (subscriber unit), a station (station), or the like.The UE may be a cellular phone (cellular phone), a personal digitalassistant (personal digital assistant, PDA), a wireless modem (Modem), awireless communications device, a handheld (handheld) device, a laptopcomputer (laptop computer), a cordless phone (cordless phone), awireless local loop (wireless local loop, WLL) station, or the like.When the UE is applied to communication in an M2M manner, the UE may bereferred to as an M2M terminal, and may be specifically a smart meter, asmart appliance, or the like that supports M2M communication.

As shown in FIG. 8, FIG. 8 shows a session management method provided inan embodiment of the present invention. User equipment UE has a firstprotocol data unit PDU session, and the method includes the followingsteps:

S101. The UE sends a service request message to an access and mobilitymanagement function AMF entity.

S102. After the access and mobility management function AMF entitydetermines that the service request message sent by the UE is received,the AMF entity obtains location information of the UE, where thelocation information is used to determine a location of the UE.

Optionally, the location information of the UE may be a base stationidentifier (such as an ID) of a base station in which the UE is located,an ID of a cell in which the UE is located, or a tracking area identity(TM) of a tracking area in which the base station is located.

S103. When determining that the UE moves out of an area corresponding tothe first PDU session, the AMF entity sends a first message to the UE,where the first message is used to instruct to re-establish or modifythe first PDU session.

Optionally, the area corresponding to the first PDU session may includethe following cases: a service area of a UPF entity corresponding to thefirst PDU session; a partial area selected by using the location of theUE as a center from a service area of a UPF entity corresponding to thefirst PDU session; an area generated by an SMF entity with reference toa service area of a UPF entity corresponding to the first PDU sessionand a service area of an adjacent UPF entity having a same function asthe UPF entity; an area determined by an SMF entity with reference to aregistration (registration) area and a service area of a UPF entity,where the registration area is allocated by the AMF entity to the UE andreceived by the SMF entity, for example, an intersection set of theregistration area and the service area of the UPF entity or a subset ofan intersection set of the registration area and the service area of theUPF entity is selected as the area corresponding to the first PDUsession; or an area that is corresponding to the first PDU session andthat is generated by an SMF entity with reference to a registrationarea, a service area of a selected UPF entity, and a service area of anadjacent UPF entity having a same function as the UPF entity, where theregistration area is allocated by the AMF entity to the UE and receivedby the SMF entity.

S104. The UE receives the first message sent by the AMF entity.

S105. The UE re-establishes or modifies the first PDU session based onthe first message.

It should be noted that the first message may be one of triggerconditions for re-establishing or modifying the first PDU session by theUE. The UE may alternatively re-establish or modify the first PDUsession based on the first message and another condition. For example,the UE needs to determine whether an SSC mode of the first PDU sessionis a first session mode or a second session mode. The another conditionis not specifically described or limited in the present invention.

In the session management method provided in this embodiment of thepresent invention, the UE sends the service request message to the AMFentity, and then the AMF entity sends, to the UE, the first message usedto determine to re-establish the first PDU session. In this way, thefirst PDU session needs to be re-established before data needs to betransmitted or received, so as to ensure that data that needs to betransmitted or received subsequently is not lost.

Optionally, in an aspect, the first message in this embodiment of thepresent invention is a service accept (Service Accept) message sent bythe AMF entity to the UE. The service accept message carries anidentifier of the first PDU session and a first indication, theidentifier is used to identify the first PDU session, and the firstindication is used to instruct to re-establish or modify the PDUsession. It may be understood that the first identifier and the firstindication are combined and are used by the UE to determine tore-establish or modify the first PDU session. Alternatively, the serviceaccept message carries an identifier of the first PDU session, and theUE determines, based on the identifier and with reference to a status ofthe first PDU session or a configuration of a DRB, to re-establish thefirst PDU session. For example, the service accept message carries theidentifier of the first PDU session, and a PDU session status carried inthe service accept message indicates that a status, of the first PDUsession, on a core network side is “unavailable”. In this case, the UEdetermines, based on the identifier of the first PDU session and thestate of the first PDU session, to re-establish the first PDU session.Alternatively, the service accept message carries an identifier of thefirst PDU session, and a radio resource control (Radio Resource Control,RRC) reconfiguration message received by the UE does not include a DRBconfiguration corresponding to the first PDU session. In this case, theUE determines to re-establish or modify the first PDU session.

Alternatively, the service accept message carries only a firstindication, and the first indication is used to instruct to re-establishor modify a PDU session that the UE requests to activate. In this case,correspondingly, the UE adds, to a service request message, anidentifier of a session that needs to be activated, and a core networkdetermines, based on the location of the UE, that sessions correspondingto all identifiers need to be re-established or modified.

In another aspect, the first message in this embodiment of the presentinvention is a service reject message sent by the AMF entity to the UE.The service reject message carries an identifier of the first PDUsession and a cause value, the identifier is used to identify the firstPDU session, and the cause value indicates that the UE moves out of anarea corresponding to a PDU session. It may be understood that the causevalue essentially indicates that the location of the UE is outside thearea corresponding to the first PDU session associated with theidentifier. Certainly, the service reject message in this embodiment ofthe present invention may alternatively carry only a cause value, and inthis case, the cause value is used to instruct to re-establish or modifya PDU session that the UE requests to activate.

The identifier of the first PDU session is not limited in thisembodiment of the present invention, provided that the identifier canuniquely identify the first PDU session.

Content carried in the first message is different due to different typesof the first message. For different first message types and messagecontent, step S105 in this embodiment of the present invention is alsodifferent. Therefore, details are described below in detail.

In an aspect, when the first message carries the identifier of the firstPDU session and the first indication, step S105 may be specificallyimplemented in the following manner:

S1051 a. If the first indication is used to instruct to re-establish thefirst PDU session, the UE determines, based on the identifier and thefirst indication, to re-establish the first PDU session.

S1051 b. If the first indication is used to instruct to modify the firstPDU session, the UE determines, based on the identifier and the firstindication, to modify the first PDU session.

In another aspect, when the first message carries the identifier of thefirst PDU session, step S105 may be specifically implemented in thefollowing manner:

S1051 c. The UE determines, based on the identifier of the first PDUsession, to re-establish or modify the first PDU session.

In still another aspect, when the first message is the service rejectmessage, and the service reject message carries the identifier of thefirst PDU session and the cause value, step S105 may be specificallyimplemented in the following manner:

S1051 d. The UE determines, based on the identifier and the cause value,to re-establish or modify the first PDU session associated with theidentifier.

It may be understood that, in this embodiment of the present invention,after step S105, the method provided in this embodiment of the presentinvention further includes the following step:

S106. The UE sends a second message to an SMF entity, where the secondmessage is used to request to re-establish or modify the first PDUsession.

Optionally, step S106 in this embodiment of the present invention may bespecifically implemented in the following manner.

If the first message sent by the AMF entity is used to instruct the UEto re-establish the first PDU session, the UE sends, to the SMF entityby using the AMF entity, a second message used to re-establish the firstPDU session. The second message may be a PDU session establishmentrequest (PDU session establishment request) message.

If the first message sent by the AMF entity is used to instruct the UEto modify the first PDU session, the UE sends, to the SMF entity byusing the AMF entity, a second message used to modify the first PDUsession. The second message may be a PDU session modification request(PDU session modification request) message. Alternatively, afterreceiving the first message used to modify the first PDU session, the UEwaits for a PDU session modification command (PDU session modificationcommand) sent by the SMF entity. If the UE does not receive the PDUsession modification command sent by the SMF entity, the UE sends, tothe AMF entity, the second message used to modify the first PDU session.(For example, the UE sets a timer, and sends a PDU session modificationrequest if the UE does not receive the PDU session modification commandwhen the timer expires.)

It may be understood that, after step S106, the method provided in thisembodiment of the present invention further includes the following step:

S107. The SMF entity selects, based on the second message (a PDU sessionestablishment request), a second UPF entity, to establish a second PDUsession with the UE; or selects, based on the second message (a PDUsession modification request), a second UPF entity to serve the firstPDU session, and at the same time, updates an IP address, a QoS flowtemplate (a packet filter and a priority), and the like that arecorresponding to the second UPF entity.

In this case, in step S107, the SMF entity may establish the second PDUsession based on the first session mode, or establish the second PDUsession based on the second session mode. This is not limited in thisembodiment of the present invention.

In this embodiment of the present invention, after the AMF entityreceives the service request message sent by the user equipment, the AMFentity may perform UPF relocation (to be specific, the AMF entitydirectly sends, to the UE, an indication used to re-establish the firstPDU session, such as the first message), or the SMF entity may performUPF relocation (to be specific, when the SMF entity determines that theUE moves out of the area corresponding to the first PDU session ordetermines that the UE moves out of the service area of the UPF entitycorresponding to the first PDU session, the SMF entity sends, to the AMFentity, a parameter used to re-establish the first PDU session, and thenthe AMF entity encapsulates the parameter used to re-establish the firstPDU session and then sends an encapsulated parameter to the UE).

For example, the AMF entity may perform UPF relocation in the followingmanner:

After receiving the service request message sent by the UE, the AMFentity may directly determine, based on a relationship between thelocation information of the UE and the area corresponding to the firstPDU session, whether to send the first message to the UE (It may beunderstood that, in this case, the AMF entity needs to store at leastthe area corresponding to the first PDU session. An implementation ofobtaining, by the AMF entity, the area corresponding to the first PDUsession is as follows: When the first PDU session is established oractivated, the SMF entity sends, to the AMF entity, the areacorresponding to the first PDU session; or after the first PDU sessionis established or activated, when the SMF entity subscribes to mobilityevent notification of the UE from the AMF entity, the SMF entityprovides, for the AMF entity, the area corresponding to the first PDUsession. The area may be the UPF service area of the UPF entitycorresponding to the first PDU session, or may be a subset of a UPFservice area using the location of the UE as a center. Anotherimplementation of obtaining, by the AMF entity, the area correspondingto the first PDU session is as follows: When the first PDU session isestablished or activated, the SMF entity sends an identifier of aselected UPF entity to the AMF entity, and the AMF entity obtains a UPFservice area based on the identifier of the UPF entity and a networktopology structure. Specifically, the AMF entity sends the first messageto the UE when determining that the location of the UE is outside thearea corresponding to the first PDU session; or when determining thatthe location of the UE is outside the area corresponding to the firstPDU session, the AMF entity sends, to the SMF entity, the location ofthe UE and/or an indication indicating that the location of the UE movesout of the area corresponding to the first PDU session.).

For example, the SMF entity may perform UPF relocation in the followingmanner:

When determining that the UE moves out of the area corresponding to thefirst PDU session, the AMF entity sends, to the SMF entity, the locationinformation of the UE and/or indication information. The indicationinformation is used to indicate that the UE moves out of the areacorresponding to the PDU session. It may be understood that, the AMFentity further needs to provide, for the SMF entity, the identifier ofthe first PDU session, so that the SMF entity determines, based on theidentifier and the indication information, that the UE moves out of thearea corresponding to the first PDU session.

Alternatively, the AMF entity obtains the location information of the UEafter receiving the service request message sent by the UE. In thiscase, the AMF entity directly sends the location information of the UEto the SMF entity. After the SMF entity receives the locationinformation of the UE and/or the indication information, the SMF entitydetermines whether the location of the UE is outside the areacorresponding to the first PDU session or is outside the service area ofthe UPF entity corresponding to the first PDU session, and the SMFentity sends a first parameter to the AMF entity when determining thatthe location of the UE is outside the area corresponding to the firstPDU session or is outside the service area of the UPF entitycorresponding to the first PDU session. The first parameter includes theidentifier of the first PDU session and the first indication, or thefirst parameter includes the identifier of the first PDU session and thecause value. The SMF entity may directly send the first parameter to theAMF entity, or the SMF entity may encapsulate the first parameter as N1SM information, and then sends the NI SM information to the AMF entity.For the first parameter directly sent by the SMF entity to the AMFentity, the AMF entity encapsulates the first parameter into a serviceaccept message or encapsulates the identifier of the first PDU sessionand the cause value into a service reject message, and then sends theservice accept message or the service reject message to the UE. For themanner in which the SMF entity sends the first parameter to the AMFentity by using the N1 SM information, the AMF entity directlyencapsulates the received N1 SM information into a service acceptmessage or a service reject message, and sends the service acceptmessage or the service reject message to UE. It may be understood that,the first parameter may be encapsulated by the SMF entity and then betransparently transmitted by the AMF entity to the UE, or may be sent bythe SMF entity to the AMF entity and then be sent by the AMF entity tothe UE.

In this embodiment of the present invention, in a scenario in which theAMF entity determines that there is a need to perform UPF entityrelocation, with reference to FIG. 8, as shown in FIG. 9A, before stepS102, the method provided in this embodiment of the present inventionfurther includes the following steps.

S108. The SMF entity sends, to the AMF entity, the area corresponding tothe first PDU session, or the SMF entity sends, to the AMF entity, aservice area of a UPF entity corresponding to the first PDU session,where the service area of the UPF entity includes at least the areacorresponding to the first PDU session or an identifier of a UPF entityselected for the first PDU session.

It may be understood that, when the AMF entity receives the service areaof the UPF entity corresponding to the first PDU session, the AMF entitymay determine, from the service area of the UPF entity, the areacorresponding to the first PDU session. In this way, the AMF entity maydetermine, based on the location of the UE, whether the UE is outsidethe area corresponding to the first PDU session.

S109. The AMF entity stores the area corresponding to the first PDUsession, or the AMF entity stores the service area of the UPF entitycorresponding to the first PDU session.

As shown in FIG. 10A and FIG. 10B, FIG. 10A and FIG. 10B show anotherimplementation of a session management method. A difference between FIG.10A and FIG. 10B and each of FIG. 8, and FIG. 9A and FIG. 9B lies inthat in FIG. 8 and FIG. 9A and FIG. 9B, the AMF entity performs UPFentity relocation, but in FIG. 10A and FIG. 10B, the SMF entity performsUPF entity relocation.

Correspondingly, step S103 may be further implemented in the followingmanner:

S110. The AMF entity sends a request message to the SMF entity, wherethe request message may be used by the SMF entity to determine whetherthe location of the UE is outside the area corresponding to the firstPDU session.

Optionally, the request message carries the location information of theUE or carries a second indication. The second indication is used toindicate whether the location of the UE is outside the areacorresponding to the first PDU session.

S111. The SMF entity determines, based on the request message, whetherthe location of the UE is outside a service area of the UPF entitycorresponding to the first PDU session, and performs S112 if thelocation of the UE is outside the service area of the UPF entitycorresponding to the first PDU session.

S112. When the SMF entity determines that the location of the UE isoutside the service area of the UPF entity corresponding to the firstPDU session, the SMF entity sends a first parameter to the UE by usingthe AMF entity, where the first parameter is used to instruct tore-establish or modify the first PDU session.

Optionally, the first parameter includes the identifier of the first PDUsession and the first indication, the identifier is used to identify thefirst PDU session, and the first indication is used to instruct the UEto re-establish or modify a PDU session.

Optionally, step S112 may be further specifically implemented in thefollowing manner:

S112 a. The SMF entity determines a session continuity mode of the firstPDU session.

S112 b. When the SMF entity determines that the session continuity modeof the first PDU session is a first session mode or a second sessionmode, and that the location of the UE is outside the service area of theUPF entity corresponding to the first PDU session, the SMF entity sendsthe first parameter to the UE by using the AMF entity.

S113. After receiving the first parameter, the AMF entity encapsulatesthe first parameter into a service accept message, and sends the serviceaccept message to the UE.

Correspondingly, as shown in FIG. 11A, step S103 may be alternativelyimplemented in the following manner:

S114. The AMF entity determines whether the location of the UE isoutside the area corresponding to the first PDU session, and performsS115 if the location of the UE is outside the area corresponding to thefirst PDU session.

S115. The AMF entity sends a second message to the SMF entity whendetermining that the location of the UE is outside the areacorresponding to the first PDU session, where the second message is usedto trigger the SMF entity to send a third message.

Optionally, the second message carries the location information of theUE or a second indication. The second indication is used to indicatethat the location of the UE is outside the area corresponding to thefirst PDU session.

S116. The AMF entity receives the third message sent by the SMF entity,where the third message carries an identifier of the first PDU sessionand a first indication.

S117. The AMF entity encapsulates the identifier of the first PDUsession and the first indication as the first message, and then sendsthe first message to the UE.

It may be learned through comparison between FIG. 11A and FIG. 11B andFIG. 10A and FIG. 10B that, a difference between FIG. 11A and FIG. 11Band FIG. 10A and FIG. 10B lies in the following: In FIG. 10A and FIG.10B, the AMF entity only sends the location information of the UE to theSMF entity, and the SMF entity determines whether the location of the UEis outside the area corresponding to the first PDU session. However, inFIG. 11A and FIG. 11B, the AMF entity sends a trigger message to the SMFentity after determining, based on the location of the UE and the areathat is corresponding to the first PDU session and that is stored in theAMF entity or the service area that is of the UPF entity correspondingto the first PDU session and that is stored in the AMF entity, that thelocation of the UE is outside the area corresponding to the first PDUsession; and in this case, the SMF entity can directly send the thirdmessage to the AMF entity without determining whether the location ofthe UE is outside the area corresponding to the first PDU session.

It should be noted that, in the embodiment shown in FIG. 11 A, the SMFentity needs to perform S108 before step S103. However, in theembodiment shown in FIG. 10A, steps S108 and S109 may be omitted.

It may be understood that, in the session management method shown inFIG. 8 to FIG. 11A and FIG. 11B, before S101 is performed, the first PDUsession is established between the UE and the SMF entity by using thefirst UPF entity.

In the foregoing embodiment, it is described that a UPF entityrelocation process is triggered by using the AMF entity and the SMFentity as execution bodies. It may be understood that, in an actual useprocess, the UPF entity relocation process may be triggered by the UE.An example in which the UE triggers UPF entity relocation is used fordescription in the following embodiment.

In a UPF entity relocation process triggered by the UE, the UE maytrigger UPF entity relocation by using a session modification (PDUSession Modification) procedure, or trigger UPF entity relocation byusing a service request (Service Request) procedure, or trigger UPFentity relocation by using a registration (Registration) procedure. In aprocess in which the UE interacts with the AMF entity or the SMF entity,different signaling is generated in different trigger procedures.Therefore, specific implementation processes of different triggerprocedures are separately described below.

As shown in FIG. 12A, FIG. 12B, and FIG. 12C, FIG. 12A, FIG. 12B, andFIG. 12C show another session management method according to anembodiment of the present invention by using an example in which UEtriggers UPF entity relocation by using a session modification procedureand a target entity is an SMF entity. The method includes the followingsteps.

S201. In a process in which the user equipment UE establishes a firstprotocol data unit PDU session, the SMF entity sends a first message tothe UE, where the first message includes an area corresponding to thefirst PDU session.

It may be understood that, the first message including the areacorresponding to the first PDU session is forwarded to the UE by the SMFentity by using an AMF entity.

Optionally, the first message carries at least the area corresponding tothe first PDU session.

Optionally, the area corresponding to the first PDU session may includethe following cases: a service area of a UPF entity corresponding to thefirst PDU session; a partial area selected by using a location of the UEas a center from a service area of a UPF entity corresponding to thefirst PDU session; an area generated by the SMF entity with reference toa service area of a UPF entity corresponding to the first PDU sessionand a service area of an adjacent UPF entity having a same function asthe UPF entity; an area determined by the SMF entity with reference to aregistration (registration) area and a service area of a UPF entity,where the registration area is allocated by the AMF entity to the UE andreceived by the SMF entity, for example, an intersection set of theregistration area and the service area of the UPF entity or a subset ofan intersection set of the registration area and the service area of theUPF entity is selected as the area corresponding to the first PDUsession; or an area that is corresponding to the first PDU session andthat is generated by the SMF entity with reference to a registrationarea, a service area of a selected UPF entity, and a service area of anadjacent UPF entity having a same function as the UPF entity, where theregistration area is allocated by the AMF entity to the UE and receivedby the SMF entity.

S202. The UE receives the first message sent by the SMF entity, andstores the area corresponding to the first PDU session, where the firstmessage includes the area corresponding to the first PDU session.

S203. When the UE moves out of the area corresponding to the first PDUsession, the UE sends a second message to the SMF entity, where thesecond message is used to indicate that a location of the UE is outsidethe area corresponding to the first PDU session, that is, the UE movesout of the area corresponding to the first PDU session.

It should be noted that, that the UE moves out of the area correspondingto the first PDU session may be one of conditions for sending the secondmessage by the UE. Another condition that needs to be met before the UEsends the second message is not specifically limited or described in thepresent invention.

For example, the second message is a PDU session modification requestmessage sent by the UE to the SMF entity. The PDU session modificationrequest message carries at least one of location information of the UEand a second indication. The second indication is used to indicate thatthe UE moves out of the area corresponding to the first PDU session.

In the session management method provided in this application, in theprocess in which the UE establishes the first PDU session, the SMFentity provides, for the UE, the area corresponding to the first PDUsession. In this way, when the UE is in an idle state, once the UE isoutside the area corresponding to the first PDU session, the UE triggersthe PDU session modification request message to update the areacorresponding to the first PDU session. In this process, the SMF entityperforms UPF relocation. Therefore, it may be ensured that UPF entityrelocation is performed before data is transmitted, so as to ensure thatdata is not lost.

It may be understood that, the second message sent by the UE to the SMFentity in step S203 is sent to the SMF entity by using the AMF entity.Specifically, as shown in FIG. 12A, the UE sends an N1 request messageto the AMF entity. The N1 request message carries an identifier of thefirst PDU session and the PDU session modification request message.After receiving the N1 message, the AMF entity sends an N11 requestmessage to the SMF entity based on the identifier of the first PDUsession. The N11 request message carries the identifier of the first PDUsession and the PDU session modification request message.

For example, the second message is the PDU session modification requestmessage sent by the UE to the SMF entity. The PDU session modificationrequest message carries at least one of location information of the UEand a second indication. The second indication is used to indicate thatthe UE moves out of the area corresponding to the first PDU session. Itmay be understood that, the UE further needs to add the identifier ofthe first PDU session to the PDU session modification request message.With reference to the identifier of the first PDU session and the secondindication, the SMF entity can determine that the UE moves out of thearea corresponding to the first PDU session.

In an aspect in this embodiment of the present invention, the UE canimmediately send the second message to the SMF entity when determiningthat the location of the UE is outside the area corresponding to thefirst PDU session. In this case, if the UE is in an idle state at acurrent moment, the UE is immediately switched from the idle state to aconnected state, and sends the second message to the SMF entity. Inanother aspect, when the UE determines that the location of the UE isoutside the area corresponding to the first PDU session, if the UE is inan idle state in this case, the UE may not be immediately switched fromthe idle state to a connected state, and instead, the UE continues tokeep in the idle state for a period of time based on a normalrequirement, and is switched from the idle state to the connected stateonly when the UE needs to send data or receives network paging, and theUE sends the second message to the target entity. To be specific, thatthe location of the UE is outside the area corresponding to the firstPDU session cannot be used as a trigger condition for entering theconnected state from the idle state by the UE.

Therefore, in an implementation, the first message further includes afirst indication. The first indication is used to instruct the UE tosend the second message to the target entity after the UE determinesthat the location of the UE is outside the area corresponding to thefirst PDU session, and when a status of the UE is switched from an idlestate to a connected state or when the UE has uplink data arriving inthe first PDU session.

It may be understood that, in this embodiment of the present invention,that the UE enters a connected state from an idle state means the abovedescriptions: When the UE is in an idle state, the UE is not immediatelyswitched from the idle state to a connected state, and instead, the UEcontinues to keep in the idle state for a period of time based on anormal requirement, and is switched from the idle state to the connectedstate only when the UE needs to send data or respond to paging. Afterentering the connected state, the UE sends the second message to performUPF relocation.

In another implementation, the first message further includes a firstindication. The first indication is used to instruct the UE toimmediately send the second message to the target entity after the UEdetermines that the location of the UE is outside the area correspondingto the first PDU session.

It may be understood that, in this embodiment of the present invention,when the UE determines that the location of the UE is outside the areacorresponding to the first PDU session, the UE may actively determinewhether to immediately send the second message to the target entity orsend the second message to the target entity only when the UE needs tobe switched from an idle state to a connected state. When the UEactively determines to send the second message to the target message,the first indication in the first message may be omitted.

Optionally, because the UE sends the second message to the SMF entityonly when the UE needs to be switched from an idle state to a connectedstate, the method provided in this embodiment of the present inventionfurther includes the following step: S204. When determining that thelocation of the UE is outside the area corresponding to the first PDUsession, the UE marks the first PDU session with a to-be-updated state,where the to-be-updated state is used to prompt the UE to send thesecond message to the UE when the UE is switched from an idle state to aconnected state, so as to indicate that the location of the UE isoutside the area corresponding to the first PDU session.

To be specific, when the UE determines that the location of the UE isoutside the area corresponding to the first PDU session, if the UE is inan idle state in this case and does not need to be immediately switchedto a connected state, the UE first marks the first PDU session with theto-be-updated state. In this way, the UE sends the second message to thetarget entity when the UE needs to be switched from the idle state tothe connected state or when the UE has uplink data arriving in the firstPDU session.

S205. The SMF entity receives the second message that is sent by the UEand that is used to indicate that the UE moves out of the areacorresponding to the first PDU session.

S206. The SMF entity updates, based on the second message, the areacorresponding to the first PDU session, or reselects a second UPF entitybased on the second message to serve the first PDU session.

Optionally, the second message carries the location information of theUE, and step S206 may be specifically implemented in the followingmanner: If a session and service continuity mode of the first PDUsession is a first session mode or a second session mode, whendetermining that the UE moves out of the area corresponding to the firstPDU session and that the UE is inside the service area of the user planefunction UPF entity corresponding to the first PDU session, the SMFentity updates the area corresponding to the first PDU session; or theSMF entity reselects a second UPF entity when determining that the UEmoves out of the area corresponding to the first PDU session and thatthe UE moves out of the service area of the UPF entity corresponding tothe first PDU session.

Optionally, in an aspect, when the SMF entity determines that there is aneed to update the area corresponding to the first PDU session, afterstep S206, the method provided in this embodiment of the presentinvention further includes the following steps:

S207. The SMF entity sends an N11 response message to an AMF entity,where the N11 response message carries a first area, and the first areais an updated area of the first PDU session.

S208. The AMF entity sends a third message to the UE.

When the UE requests to trigger UPF entity relocation by using thesession modification procedure, the third message is a PDU sessionmodification accept message sent by the AMF entity to the UE.

S209. The UE receives the third message sent by the AMF entity.

S210. The UE updates, based on the third message to the first area, thearea corresponding to the first PDU session.

Optionally, the UE updates, to a first QoS flow template, a flowtemplate corresponding to a QoS flow in the first PDU session.

Optionally, after receiving a first IP address, the UE locally updatesthe QoS flow template. In an implementation, the UE replaces, with thefirst IP address, a source IP address in a packet filter in the QoS flowtemplate.

Optionally, the N11 response message further includes a first IPaddress, and therefore the third message further includes the first IPaddress. The first IP address is an updated IP address of the first PDUsession.

Optionally, the method provided in this embodiment of the presentinvention further includes the following step:

S211. The UE updates, to a first IP address, an IP address correspondingto the first PDU session.

In the session management method provided in this application, in theprocess in which the UE establishes the first PDU session, the SMFentity provides, for the UE, the area corresponding to the first PDUsession. In this way, when the UE is in an idle state, once the UE isoutside the area corresponding to the first PDU session, the UE triggersthe PDU session modification request message to update the areacorresponding to the first PDU session. In this process, the SMF entityperforms UPF relocation. Therefore, it may be ensured that UPF entityrelocation is performed before data is transmitted, so as to ensure thatdata is not lost.

Optionally, in another aspect, when the SMF entity determines that thereis a need to reselect a second UPF entity, the method provided in thisembodiment of the present invention further includes the followingsteps:

S212. The SMF entity sends a session establishment request to the secondUPF entity, where the session establishment request carries anidentifier of the first PDU session.

S213. The SMF entity receives a session establishment response sent bythe second UPF entity.

As shown in FIG. 13A, FIG. 13B, and FIG. 13C, a difference between FIG.13A, FIG. 13B, and FIG. 13C and FIG. 12A, FIG. 12B, and FIG. 12C lies inthe following: In FIG. 12A, FIG. 12B, and FIG. 12C, the N1 requestmessage sent by the UE to the AMF entity carries the identifier of thefirst PDU session and the PDU session modification request message, andthe PDU session modification request message includes the locationinformation of the UE. Then, after receiving the request message, theAMF entity sends the identifier of the first PDU session and the PDUsession modification request message to the SMF entity, so that the SMFentity determines, based on the location of the UE, the service area ofthe UPF entity corresponding to the first PDU session, and a sessionmode of the first PDU session, to update the area corresponding to thefirst PDU session or reselect a second UPF entity. However, in FIG. 13A,FIG. 13B, and FIG. 13C, the N1 request message sent by the UE to the AMFentity carries the identifier of the first PDU session, an indicationused to update the first session area, and the PDU session modificationrequest message. Then, after receiving the N1 request message sent bythe UE, the AMF entity sends, to an SMF entity indicated by theidentifier of the first PDU session, the location information of the UEand the PDU session modification request message based on the indicationused to update the first session area (it may be understood that, theAMF entity stores a mapping relationship between an identifier of theSMF entity and the identifier of the first PDU session, and the SMFentity sends, to the AMF entity, the mapping relationship between theidentifier of the SMF entity and the identifier of the first PDU sessionafter the first PDU session is established).

In the session management method provided in this application, in theprocess in which the UE establishes the first PDU session with the SMFentity, the SMF entity provides, for the UE, the area corresponding tothe first PDU session. In this way, when the UE is in an idle state,once the UE is outside the area corresponding to the first PDU session,the UE triggers the PDU session modification request message to updatethe area corresponding to the first PDU session. In this process, theSMF entity performs UPF relocation. Therefore, it may be ensured thatUPF entity relocation is performed before data is transmitted, so as toensure that data is not lost.

As shown in FIG. 14A, FIG. 14B, and FIG. 14C, FIG. 14A, FIG. 14B, andFIG. 14C show another session management method according to anembodiment of the present invention by using an example in which UEtriggers UPF entity relocation by using a service request messageprocedure and a target entity is an AMF entity. Specifically, adifference between FIG. 14A, FIG. 14B, and FIG. 14C and FIG. 12A, FIG.12B, and FIG. 12C lies in that the second message sent by the UE in stepS203 is a service request message sent to the AMF entity. The servicerequest message carries the identifier of the first PDU session and anindication used to instruct to update the area of the first PDU session.Then, the AMF entity sends, to an SMF entity indicated by the identifierof the first PDU session, the location information of the UE and theidentifier of the first PDU session based on the indication used toinstruct to update the area of the first PDU session.

When the UE triggers UPF entity relocation by using the service requestmessage procedure, the third message is a service accept message sent bythe AMF entity to the UE.

In the session management method provided in this application, in theprocess in which the UE establishes the first PDU session with the SMFentity, the SMF entity provides, for the UE, the area corresponding tothe first PDU session. In this way, when the UE is in an idle state,once the UE is outside the area corresponding to the first PDU session,the UE triggers the PDU session modification request message to updatethe area corresponding to the first PDU session. In this process, theSMF entity performs UPF relocation. Therefore, it may be ensured thatUPF entity relocation is performed before data is transmitted, so as toensure that data is not lost.

As shown in FIG. 15A, FIG. 15B, and FIG. 15C, FIG. 15A, FIG. 15B, andFIG. 15C are described by using an example in which a target entity isan AMF entity and UE triggers UPF entity relocation by using aregistration procedure. A difference between an embodiment described inFIG. 15A, FIG. 15B, and FIG. 15C and that described in FIG. 14A, FIG.14B, and FIG. 14C lies in that the second message sent by the UE to theAMF entity is a registration request message sent by the UE to the AMFentity. The registration request message carries a first cause value,and the first cause value is used to indicate that the UE moves out ofthe area corresponding to the first PDU session. Then, the AMF entitydetermines, based on the first cause value, to send the locationinformation of the UE to the SMF entity.

It may be understood that, in this embodiment of the present invention,in order that an SMF entity that re-establishes a second PDU session isthe same as the SMF entity that establishes the first PDU session, arequest message or the registration request message or a service requestmessage that is sent by the UE to the AMF entity carries the identifierof the first PDU session. In this way, it may be ensured that the AMFentity sends the location information of the UE to an SMF entity thathas a mapping relationship with the first PDU session.

When the UE requests to trigger UPF entity relocation by using theregistration procedure, the third message is a registration acceptmessage sent by the AMF entity to the UE.

In the session management method provided in this application, in theprocess in which the UE establishes the first PDU session with the SMFentity, the SMF entity provides, for the UE, the area corresponding tothe first PDU session. In this way, when the UE is in an idle state,once the UE is outside the area corresponding to the first PDU session,the UE triggers the PDU session modification request message to updatethe area corresponding to the first PDU session. In this process, theSMF entity performs UPF relocation. Therefore, it may be ensured thatUPF entity relocation is performed before data is transmitted, so as toensure that data is not lost.

The foregoing describes the solutions provided in this applicationmainly from a perspective of interaction between user equipment, an AMFentity, and an SMF entity. It may be understood that, to implement theforegoing functions, the user equipment, the AMF entity, the SMF entity,and the like include corresponding hardware structures and/or softwaremodules for performing the functions. A person skilled in the art shouldbe easily aware that, with reference to the user equipment, the AMFentity, the SMF entity, and method steps in the examples described inthe embodiments disclosed in this specification, the present inventioncan be implemented in a form of hardware or a combination of hardwareand computer software. Whether a function is performed in a form ofhardware or hardware driven by computer software depends on particularapplications and design constraint conditions of the technicalsolutions. A person skilled in the art may use different methods toimplement the described functions for each particular application, butit should not be considered that the implementation goes beyond thescope of this application.

In the embodiments of the present invention, the user equipment, the AMFentity, the SMF entity, and the like may be divided into functionmodules based on the foregoing method examples. For example, eachfunction module may be obtained through division for each correspondingfunction, or two or more functions may be integrated into one processingmodule. The integrated module may be implemented in a form of hardware,or may be implemented in a form of a software function module. It shouldbe noted that, the module division in the embodiments of the presentinvention is an example, and is only logical function division. Theremay be another division manner in actual implementation.

When each function module is obtained through division for eachcorresponding function, FIG. 16 is a possible schematic structuraldiagram of an AMF entity used in the foregoing embodiment. An AMF entity10 includes a sending unit 401 and a receiving unit 402. The receivingunit 402 is configured to support the AMF entity 10 in performing stepsS102 and S116 in the foregoing embodiment, and the sending unit 401 isconfigured to support the AMF entity 10 in performing steps S103, S110,S113, S115, S117, and S208 in the foregoing embodiment. It may beunderstood that, the AMF entity 10 provided in this embodiment of thepresent invention may further include: an obtaining unit 403, configuredto support the AMF entity in performing step S102 in the foregoingembodiment; and a storing unit 404, configured to support the AMF entityin performing step S109 in the foregoing embodiment. All related contentof each step in the foregoing method embodiment may be cited in functiondescriptions of a corresponding function module, and details are notdescribed herein.

Specifically, in hardware implementation, the receiving unit 402 may bea receiver of the AMF entity 10, and the sending unit 401 may be atransmitter of the AMF entity 10. The transmitter and the receiver maybe integrated to constitute a transceiver shown in FIG. 5. The obtainingunit 403 and the storing unit 404 may be integrated into a processor ofthe AMF entity 10.

When an integrated unit is used, FIG. 17 is a schematic diagram of apossible logical structure of the AMF entity 10 used in the foregoingembodiment. The AMF entity 10 includes a processing module 512 and acommunications module 513. The processing module 512 is configured tocontrol and manage an action of the AMF entity 10. For example, theprocessing module 512 is configured to perform steps S102 and S116,steps S103, S110, S113, S115, S117, S208, and S102, and step S109 in theforegoing embodiment, and/or is configured to perform another process ofthe technology described in this specification. The communicationsmodule 513 is configured to support the AMF entity 10 in communicatingwith user equipment and an SMF entity. The AMF entity 10 may furtherinclude a storage module 511, configured to store program code and dataof the AMF entity 10.

The processing module 512 may be a processor or a controller, forexample, may be a central processing unit, a general purpose processor,a digital signal processor, an application-specific integrated circuit,a field programmable gate array or another programmable logical device,a transistor logical device, a hardware component, or any combinationthereof. The controller/processor may implement or execute variousexample logical blocks, modules, and circuits described with referenceto content disclosed in the present invention. Alternatively, theprocessor may be a combination that implements a computing function, forexample, a combination including one or more microprocessors, or acombination of a digital signal processor and a microprocessor. Thecommunications module 513 may be a transceiver, a transceiver circuit, atransceiver, or the like. The storage module 511 may be a memory.

When the processing module 512 is a processor, the communications module513 is a transceiver, and the storage module 511 is a memory, the AMFentity used in this embodiment of the present invention may be a deviceshown in FIG. 5.

When each function module is obtained through division for eachcorresponding function, FIG. 18 is a possible schematic structuraldiagram of an SMF entity used in the foregoing embodiment. An SMF entity20 includes: a receiving unit 601, configured to receive a first messagethat is sent by an access and mobility management function AMF entityand that is used to instruct the SMF entity to determine whether UEmoves out of an area corresponding to a first PDU session; a sendingunit 602, configured to support the SMF entity in performing steps S112,S112 b, and S108 in the foregoing embodiment; a determining unit 603,configured to determine a session continuity mode of the first PDUsession and perform S112 a; and a judging unit, configured to supportthe SMF entity in performing step S111 in the foregoing embodiment. Allrelated content of each step in the foregoing method embodiment may becited in function descriptions of a corresponding function module, anddetails are not described herein.

Specifically, in hardware implementation, the sending unit 601 may be atransmitter of the SMF entity, the receiving unit 602 may be a receiverof the SMF entity. The receiver and the transmitter may be integrated toconstitute a transceiver of the SMF entity 20, as shown in FIG. 6. Thedetermining unit 603 may be integrated into a processor of the SMFentity 20.

When an integrated unit is used, FIG. 19 is a schematic diagram of apossible logical structure of the SMF entity 20 used in the foregoingembodiment. The SMF entity 20 includes a processing module 712 and acommunications module 713. The processing module 712 is configured tocontrol and manage an action of the SMF entity 20. For example, theprocessing module 712 is configured to support the SMF entity 20 inperforming steps that are performed by an SMF entity in the embodimentshown in FIG. 8 to FIG. 11A and FIG. 11B. For example, the processingmodule 712 is configured to receive a first message that is sent by anaccess and mobility management function AMF entity and that is used toinstruct the SMF entity to determine whether UE moves out of an areacorresponding to a first PDU session, perform S108 and steps S112 andS112 b, and determine a session continuity mode of the first PDU sessionand perform S112 a, and/or is configured to perform another process ofthe technology described in this specification. The communicationsmodule 713 is configured to support the SMF entity 20 in communicatingwith the AMF entity. The SMF entity 20 may further include a storagemodule 711, configured to store program code and data of the SMF entity20.

The processing module 712 may be a processor or a controller, forexample, may be a central processing unit, a general purpose processor,a digital signal processor, an application-specific integrated circuit,a field programmable gate array or another programmable logical device,a transistor logical device, a hardware component, or any combinationthereof. The controller/processor may implement or execute variousexample logical blocks, modules, and circuits described with referenceto content disclosed in the present invention. Alternatively, theprocessor may be a combination that implements a computing function, forexample, a combination including one or more microprocessors, or acombination of a digital signal processor and a microprocessor. Thecommunications module 713 may be a transceiver, a transceiver circuit, atransceiver, or the like. The storage module 711 may be a memory.

When the processing module 712 is a processor, the communications module713 is a transceiver, and the storage module 711 is a memory, the SMFentity used in this embodiment of the present invention may be a deviceshown in FIG. 6.

When each function module is obtained through division for eachcorresponding function, FIG. 20 is a possible schematic structuraldiagram of user equipment used in the foregoing embodiment. Userequipment 30 includes a sending unit 801, a receiving unit 802, and adetermining unit 803. The sending unit 801 is configured to support theUE in performing S101 and S106 in the foregoing embodiment. Thereceiving unit 802 is configured to support the user equipment 30 inperforming step S104 in the foregoing embodiment. The determining unit803 is configured to support the user equipment 30 in performing stepS105 in the foregoing embodiment. All related content of each step inthe foregoing method embodiment may be cited in function descriptions ofa corresponding function module, and details are not described herein.

When each function module is obtained through division for eachcorresponding function, FIG. 21 is a possible schematic structuraldiagram of user equipment used in the foregoing embodiment. Userequipment 30 includes a receiving unit 901, a sending unit 902, and amarking unit 903. The receiving unit 901 is configured to support the UEin performing S202 and S209 in the foregoing embodiment. The sendingunit 902 is configured to support the user equipment 30 in performingstep S203 in the foregoing embodiment. The marking unit 903 isconfigured to support the user equipment 30 in performing step S204 inthe foregoing embodiment. The user equipment further includes anupdating unit 904, configured to support the user equipment inperforming S210 and S211. All related content of each step in theforegoing method embodiment may be cited in function descriptions of acorresponding function module, and details are not described herein.

Specifically, in hardware implementation, the sending unit 801 and thesending unit 902 may be a transmitter of the user equipment 30, thereceiving unit 802 and the receiving unit 901 may be a receiver of theuser equipment 30. The receiver and the transmitter may be integrated toconstitute a transceiver of the user equipment 30, as shown in FIG. 7.The updating unit 904 and the marking unit 903 may be integrated into aprocessor of the user equipment 30.

When an integrated unit is used, FIG. 22 is a schematic diagram of apossible logical structure of the user equipment 30 used in theforegoing embodiment. The user equipment 30 includes a processing module1012 and a communications module 1013. The processing module 1012 isconfigured to control and manage an action of the user equipment 30. Forexample, the processing module 1012 is configured to support the userequipment 30 in performing all steps that are performed by UE in FIG. 8to FIG. 11A and FIG. 11B, and/or is configured to perform anotherprocess of the technology described in this specification. Thecommunications module 1013 is configured to support the user equipment30 in communicating with an AMF entity. The user equipment 30 mayfurther include a storage module 1011, configured to store program codeand data of the user equipment 30.

The processing module 1012 may be a processor or a controller, forexample, may be a central processing unit, a general purpose processor,a digital signal processor, an application-specific integrated circuit,a field programmable gate array or another programmable logical device,a transistor logical device, a hardware component, or any combinationthereof. The controller/processor may implement or execute variousexample logical blocks, modules, and circuits described with referenceto content disclosed in the present invention. Alternatively, theprocessor may be a combination that implements a computing function, forexample, a combination including one or more microprocessors, or acombination of a digital signal processor and a microprocessor. Thecommunications module 1013 may be a transceiver, a transceiver circuit,a transceiver, or the like. The storage module 1011 may be a memory.

When the processing module 1012 is a processor, the communicationsmodule 1013 is a transceiver, and the storage module 1011 is a memory,the user equipment used in this embodiment of the present invention maybe a device shown in FIG. 7.

FIG. 23 is a possible schematic structural diagram of an SMF entity usedin the foregoing embodiment. An SMF entity 20 includes a sending unit1101, a receiving unit 1102, and a processing unit 1103. The sendingunit 1101 is configured to support user equipment in performing stepsS201, S207, and S212 in the foregoing embodiment. The receiving unit1102 is configured to support the SMF entity in performing S205 and S213in the foregoing embodiment. The processing unit 1103 is configured tosupport the SMF entity in performing S206 in the foregoing embodiment.All related content of each step in the foregoing method embodiment maybe cited in function descriptions of a corresponding function module,and details are not described herein.

Specifically, in hardware implementation, the sending unit 1101 may be atransmitter of the SMF entity, the receiving unit 1102 may be a receiverof the SMF entity. The receiver and the transmitter may be integrated toconstitute a transceiver of the SMF entity 20, as shown in FIG. 6. Theprocessing unit 1103 may be integrated into a processor of the SMFentity 20.

When an integrated unit is used, the SMF entity 20 shown in FIG. 23 mayuse the logical structure shown in FIG. 19. Specifically, the processingmodule 712 shown in FIG. 19 is configured to control and manage anaction of the SMF entity 20. For example, the processing module 712 isconfigured to support the SMF entity 20 in performing steps that areperformed by an SMF entity in the embodiment shown in FIG. 12A, FIG.12B, and FIG. 12C to FIG. 15A, FIG. 15B, and FIG. 15C, and/or isconfigured to perform another process of the technology described inthis specification. The communications module 713 is configured tosupport the SMF entity 20 in communicating with an AMF entity. The SMFentity 20 may further include a storage module 711, configured to storeprogram code and data of the SMF entity 20.

In an aspect, an embodiment of the present invention provides a computerreadable storage medium, and the computer readable storage medium storesan instruction. When the computer readable storage medium runs on an SMFentity, the SMF entity performs steps that are performed by an SMFentity in the foregoing embodiments (including all steps performed by anSMF entity in FIG. 8 to FIG. 11A and FIG. 11B, and all steps performedby an SMF entity in FIG. 12A, FIG. 12B, and FIG. 12C to FIG. 15A, FIG.15B, and FIG. 15C).

In another aspect, an embodiment of the present invention provides acomputer readable storage medium, and the computer readable storagemedium stores an instruction. When the computer readable storage mediumruns on an AMF entity, the AMF entity performs steps that are performedby an AMF entity in the foregoing embodiments (including all stepsperformed by an AMF entity in FIG. 8 to FIG. 11A and FIG. 11B, and allsteps performed by an AMF entity in FIG. 12A, FIG. 12B, and FIG. 12C toFIG. 15A, FIG. 15B, and FIG. 15C).

In still another aspect, an embodiment of the present invention providesa computer readable storage medium, and the computer readable storagemedium stores an instruction. When the computer readable storage mediumruns on user equipment, the user equipment performs steps that areperformed by UE in the foregoing embodiments (including all stepsperformed by UE in FIG. 8 to FIG. 11A and FIG. 11B, and all stepsperformed by a UE entity in FIG. 12A, FIG. 12B, and FIG. 12C to FIG.15A, FIG. 15B, and FIG. 15C).

A person skilled in the art should understand that the embodiments ofthis application may be provided as a method, a system, or a computerprogram product. Therefore, the embodiments of this application may usea form of hardware only embodiments, software only embodiments, orembodiments with a combination of software and hardware. Moreover, theembodiments of this application may use a form of a computer programproduct that is implemented on one or more computer usable storage media(including but not limited to a disk memory, a CD-ROM, an opticalmemory, and the like) that include computer usable program code.

The embodiments of this application are described with reference to theflowcharts and/or block diagrams of the method, the device (system), andthe computer program product according to the embodiments of thisapplication. It should be understood that computer program instructionsmay be used to implement each process and/or each block in theflowcharts and/or the block diagrams, and a combination of a processand/or a block in the flowcharts and/or the block diagrams. Thesecomputer program instructions may be provided for a general-purposecomputer, a dedicated computer, an embedded processor, or a processor ofany other programmable data processing device to generate a machine, sothat the instructions executed by a computer or a processor of any otherprogrammable data processing device generate an apparatus forimplementing a specific function in one or more processes in theflowcharts and/or in one or more blocks in the block diagrams.

These computer program instructions may be stored in a computer readablememory that can instruct the computer or any other programmable dataprocessing device to work in a specific manner, so that the instructionsstored in the computer readable memory generate an artifact thatincludes an instruction apparatus. The instruction apparatus implementsa specified function in one or more processes in the flowcharts and/orin one or more blocks in the block diagrams.

These computer program instructions may also be loaded onto a computeror another programmable data processing device, so that a series ofoperations and steps are performed on the computer or the anotherprogrammable device, thereby generating computer-implemented processing.Therefore, the instructions executed on the computer or the anotherprogrammable device provide steps for implementing a specific functionin one or more processes in the flowcharts and/or in one or more blocksin the block diagrams.

Obviously, a person skilled in the art can make various modificationsand variations to the embodiments of this application without departingfrom the spirit and scope of this application. This application isintended to cover these modifications and variations provided that theyfall within the scope of protection defined by the following claims andtheir equivalent technologies.

1. A session management method, comprising: receiving, by a sessionmanagement function (SMF) entity, a first message from an access andmobility management function (AMF) entity, wherein the first messagecarries location information of a user equipment (UE); determining, bythe SMF entity based on the first message, that the UE moves out of aservice area of a first user plane function (UPF) entity correspondingto a first protocol data unit (PDU) session; and sending, by the SMFentity, an identifier of the first PDU session and a first indication tothe UE, wherein the first indication instructs the UE to re-establishthe first PDU session, and wherein re-establishing the first PDU sessioncomprises establishing a second PDU session to a same data network. 2.The session management method of claim 1, wherein a service continuitymode of the first PDU session is a first session and service continuity(SSC) mode or a second SSC mode.
 3. The session management method ofclaim 2, further comprising releasing the first PDU session beforeestablishing the second PDU session when the service continuity mode isthe first SSC mode.
 4. The session management method of claim 3, furthercomprising establishing the second PDU session before releasing thefirst PDU session when the service continuity mode is the second SSCmode.
 5. The session management method of claim 1, wherein the UE is inan idle state.
 6. The session management method of claim 1, wherein theUE is in a connected state.
 7. The session management method of claim 6,wherein a user plane connection between the UE and the first UPF entitydoes not exist.
 8. The session management method of claim 1, furthercomprising: selecting a second UPF entity to establish the second PDUsession for the UE; and establishing the second PDU session between theUE and the second UPF entity.
 9. The session management method of claim1, wherein the first UPF entity is an anchor UPF entity.
 10. The sessionmanagement method of claim 1, wherein the SMF entity sends theidentifier of the first PDU session and the first indication with N1session management (SM) information.
 11. A session management function(SMF) entity, comprising: a processor; and a memory coupled to theprocessor and configured to store instructions executable by theprocessor to cause the SMF entity to: receive a first message from anaccess and mobility management function (AMF) entity, wherein the firstmessage carries location information of a user equipment (UE); determinethat the UE moves out of a service area of a first user plane function(UPF) entity corresponding to a first protocol data unit (PDU) session;and send an identifier of the first PDU session and a first indicationto the UE, wherein the first indication instructs the UE to re-establishthe first PDU session, and wherein re-establishing the first PDU sessioncomprises establishing a second PDU session to a same data network. 12.The SMF entity of claim 11, wherein a service continuity mode of thefirst PDU session is a first session and service continuity (SSC) modeor a second SSC mode.
 13. The SMF entity of claim 12, wherein the firstPDU session is released before the second PDU session is establishedwhen the service continuity mode is the first SSC mode.
 14. The SMFentity of claim 13, wherein the second PDU session is established beforethe first PDU session is released when the service continuity mode isthe second SSC mode.
 15. The SMF entity of claim 11, wherein the UE isin an idle state.
 16. The SMF entity of claim 11, wherein the UE is in aconnected state.
 17. The SMF entity of claim 16, wherein a user planeconnection between the UE and the first UPF entity does not exist. 18.The SMF entity of claim 11, wherein the instructions further cause theSMF entity to: select a second UPF entity to establish the second PDUsession for the UE; and establish the second PDU session between the UEand the second UPF entity.
 19. The SMF entity of claim 11, wherein thefirst UPF entity is an anchor UPF entity.
 20. The SMF entity of claim11, wherein the instructions further cause the SMF entity to send theidentifier and the first indication with N1 session management (SM)information.